<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>File Source for QueryPath.php</title>
	<link rel="stylesheet" type="text/css" href="../media/style.css">
	<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
	<script src="media/a.js"></script>
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
	<td class="header-top-left"><img src="../media/logo.png" border="0" alt="phpDocumentor " /></td>
    <td class="header-top-right">QueryPath<br /><div class="header-top-right-subpackage"></div></td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td colspan="2" class="header-menu">
      
                        
                                                  		[ <a href="../classtrees_QueryPath.html" class="menu">class tree: QueryPath</a> ]
		[ <a href="../elementindex_QueryPath.html" class="menu">index: QueryPath</a> ]
            [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="195" class="menu">
		<div class="package-title">QueryPath</div>
  <div class="package">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
	</div>
      <b>Packages:</b><br />
  <div class="package">
              <a href="../li_QueryPath.html">QueryPath</a><br />
              <a href="../li_Examples.html">Examples</a><br />
              <a href="../li_Tests.html">Tests</a><br />
      	</div>
      <br />
                        <br />
                      </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1 align="center">Source for file QueryPath.php</h1>
<p>Documentation is available at <a href="../QueryPath/_src---QueryPath---QueryPath.php.html">QueryPath.php</a></p>
<div class="src-code"><span class="php">
<ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-doc">&nbsp;*&nbsp;The&nbsp;Query&nbsp;Path&nbsp;package&nbsp;provides&nbsp;tools&nbsp;for&nbsp;manipulating&nbsp;a&nbsp;Document&nbsp;Object&nbsp;Model.</span></div></li>
<li><div class="src-line"><a name="a4"></a><span class="src-doc">&nbsp;*&nbsp;The&nbsp;two&nbsp;major&nbsp;DOMs&nbsp;are&nbsp;the&nbsp;XML&nbsp;DOM&nbsp;and&nbsp;the&nbsp;HTML&nbsp;DOM.&nbsp;Using&nbsp;Query&nbsp;Path,&nbsp;you&nbsp;can</span></div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-doc">&nbsp;*&nbsp;build,&nbsp;parse,&nbsp;search,&nbsp;and&nbsp;modify&nbsp;DOM&nbsp;documents.</span></div></li>
<li><div class="src-line"><a name="a6"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a7"></a><span class="src-doc">&nbsp;*&nbsp;To&nbsp;use&nbsp;Query&nbsp;Path,&nbsp;this&nbsp;is&nbsp;the&nbsp;only&nbsp;file&nbsp;you&nbsp;should&nbsp;need&nbsp;to&nbsp;import.</span></div></li>
<li><div class="src-line"><a name="a8"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a9"></a><span class="src-doc">&nbsp;*&nbsp;Standard&nbsp;usage:</span></div></li>
<li><div class="src-line"><a name="a10"></a><span class="src-doc">&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a11"></a><span class="src-doc">&nbsp;*&nbsp;&lt;?php</span></div></li>
<li><div class="src-line"><a name="a12"></a><span class="src-doc">&nbsp;*&nbsp;$qp&nbsp;=&nbsp;qp('#myID',&nbsp;'&lt;?xml&nbsp;version=&quot;1.0&quot;?&gt;&lt;test&gt;&lt;foo&nbsp;id=&quot;myID&quot;/&gt;&lt;/test&gt;');</span></div></li>
<li><div class="src-line"><a name="a13"></a><span class="src-doc">&nbsp;*&nbsp;$qp-&gt;append('&lt;new&gt;&lt;elements/&gt;&lt;/new&gt;')-&gt;writeHTML();</span></div></li>
<li><div class="src-line"><a name="a14"></a><span class="src-doc">&nbsp;*&nbsp;?&gt;</span></div></li>
<li><div class="src-line"><a name="a15"></a><span class="src-doc">&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a16"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a17"></a><span class="src-doc">&nbsp;*&nbsp;The&nbsp;above&nbsp;would&nbsp;print&nbsp;(formatted&nbsp;for&nbsp;readability):</span></div></li>
<li><div class="src-line"><a name="a18"></a><span class="src-doc">&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a19"></a><span class="src-doc">&nbsp;*&nbsp;&lt;?xml&nbsp;version=&quot;1.0&quot;?&gt;</span></div></li>
<li><div class="src-line"><a name="a20"></a><span class="src-doc">&nbsp;*&nbsp;&lt;test&gt;</span></div></li>
<li><div class="src-line"><a name="a21"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&lt;foo&nbsp;id=&quot;myID&quot;&gt;</span></div></li>
<li><div class="src-line"><a name="a22"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&lt;new&gt;</span></div></li>
<li><div class="src-line"><a name="a23"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;element/&gt;</span></div></li>
<li><div class="src-line"><a name="a24"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&lt;/new&gt;</span></div></li>
<li><div class="src-line"><a name="a25"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&lt;/foo&gt;</span></div></li>
<li><div class="src-line"><a name="a26"></a><span class="src-doc">&nbsp;*&nbsp;&lt;/test&gt;</span></div></li>
<li><div class="src-line"><a name="a27"></a><span class="src-doc">&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a28"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a29"></a><span class="src-doc">&nbsp;*&nbsp;To&nbsp;learn&nbsp;about&nbsp;the&nbsp;functions&nbsp;available&nbsp;to&nbsp;a&nbsp;Query&nbsp;Path&nbsp;object,</span></div></li>
<li><div class="src-line"><a name="a30"></a><span class="src-doc">&nbsp;*&nbsp;see&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;QueryPath}</span><span class="src-doc">.&nbsp;The&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;qp()}</span><span class="src-doc">&nbsp;function&nbsp;is&nbsp;used&nbsp;to&nbsp;build</span></div></li>
<li><div class="src-line"><a name="a31"></a><span class="src-doc">&nbsp;*&nbsp;new&nbsp;QueryPath&nbsp;objects.&nbsp;The&nbsp;documentation&nbsp;for&nbsp;that&nbsp;function&nbsp;explains&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a32"></a><span class="src-doc">&nbsp;*&nbsp;wealth&nbsp;of&nbsp;arguments&nbsp;that&nbsp;the&nbsp;function&nbsp;can&nbsp;take.</span></div></li>
<li><div class="src-line"><a name="a33"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a34"></a><span class="src-doc">&nbsp;*&nbsp;Included&nbsp;with&nbsp;the&nbsp;source&nbsp;code&nbsp;for&nbsp;QueryPath&nbsp;is&nbsp;a&nbsp;complete&nbsp;set&nbsp;of&nbsp;unit&nbsp;tests</span></div></li>
<li><div class="src-line"><a name="a35"></a><span class="src-doc">&nbsp;*&nbsp;as&nbsp;well&nbsp;as&nbsp;some&nbsp;example&nbsp;files.&nbsp;THose&nbsp;are&nbsp;good&nbsp;resources&nbsp;for&nbsp;learning&nbsp;about</span></div></li>
<li><div class="src-line"><a name="a36"></a><span class="src-doc">&nbsp;*&nbsp;how&nbsp;to&nbsp;apply&nbsp;QueryPath's&nbsp;tools.</span></div></li>
<li><div class="src-line"><a name="a37"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a38"></a><span class="src-doc">&nbsp;*&nbsp;If&nbsp;you&nbsp;are&nbsp;interested&nbsp;in&nbsp;building&nbsp;extensions&nbsp;for&nbsp;QueryParser,&nbsp;see&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a39"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;QueryPathExtender}</span><span class="src-doc">&nbsp;class.&nbsp;There,&nbsp;you&nbsp;will&nbsp;find&nbsp;information&nbsp;on&nbsp;adding</span></div></li>
<li><div class="src-line"><a name="a40"></a><span class="src-doc">&nbsp;*&nbsp;your&nbsp;own&nbsp;tools&nbsp;to&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a41"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a42"></a><span class="src-doc">&nbsp;*&nbsp;QueryPath&nbsp;also&nbsp;comes&nbsp;with&nbsp;a&nbsp;full&nbsp;CSS&nbsp;3&nbsp;selector&nbsp;parser&nbsp;implementation.&nbsp;If</span></div></li>
<li><div class="src-line"><a name="a43"></a><span class="src-doc">&nbsp;*&nbsp;you&nbsp;are&nbsp;interested&nbsp;in&nbsp;reusing&nbsp;that&nbsp;in&nbsp;other&nbsp;code,&nbsp;you&nbsp;will&nbsp;want&nbsp;to&nbsp;start</span></div></li>
<li><div class="src-line"><a name="a44"></a><span class="src-doc">&nbsp;*&nbsp;with&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;CssEventHandler.php}</span><span class="src-doc">,&nbsp;which&nbsp;is&nbsp;the&nbsp;event&nbsp;interface&nbsp;for&nbsp;the&nbsp;parser.</span></div></li>
<li><div class="src-line"><a name="a45"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a46"></a><span class="src-doc">&nbsp;*&nbsp;If&nbsp;you&nbsp;want&nbsp;to&nbsp;learn&nbsp;the&nbsp;nitty&nbsp;gritty&nbsp;details&nbsp;of&nbsp;QueryPath,&nbsp;you&nbsp;can&nbsp;take&nbsp;a</span></div></li>
<li><div class="src-line"><a name="a47"></a><span class="src-doc">&nbsp;*&nbsp;look&nbsp;at&nbsp;the&nbsp;implementation&nbsp;in&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;QueryPathImpl.php}</span><span class="src-doc">.&nbsp;There&nbsp;you&nbsp;will&nbsp;find</span></div></li>
<li><div class="src-line"><a name="a48"></a><span class="src-doc">&nbsp;*&nbsp;the&nbsp;&quot;real&quot;&nbsp;code.</span></div></li>
<li><div class="src-line"><a name="a49"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a50"></a><span class="src-doc">&nbsp;*&nbsp;All&nbsp;of&nbsp;the&nbsp;code&nbsp;in&nbsp;QueryPath&nbsp;is&nbsp;licensed&nbsp;under&nbsp;either&nbsp;the&nbsp;LGPL&nbsp;or&nbsp;an&nbsp;MIT-like</span></div></li>
<li><div class="src-line"><a name="a51"></a><span class="src-doc">&nbsp;*&nbsp;license&nbsp;(you&nbsp;may&nbsp;choose&nbsp;which&nbsp;you&nbsp;prefer).&nbsp;All&nbsp;of&nbsp;the&nbsp;code&nbsp;is&nbsp;Copyright,&nbsp;2009</span></div></li>
<li><div class="src-line"><a name="a52"></a><span class="src-doc">&nbsp;*&nbsp;by&nbsp;Matt&nbsp;Butcher.</span></div></li>
<li><div class="src-line"><a name="a53"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/simple_example.php&nbsp;Basic&nbsp;Example</span></div></li>
<li><div class="src-line"><a name="a54"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/html.php&nbsp;Generating&nbsp;HTML</span></div></li>
<li><div class="src-line"><a name="a55"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/xml.php&nbsp;Using&nbsp;XML</span></div></li>
<li><div class="src-line"><a name="a56"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/rss.php&nbsp;Generating&nbsp;RSS&nbsp;(Really&nbsp;Simple&nbsp;Syndication)</span></div></li>
<li><div class="src-line"><a name="a57"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/svg.php&nbsp;Working&nbsp;with&nbsp;SVG&nbsp;(Scalable&nbsp;Vector&nbsp;Graphics)</span></div></li>
<li><div class="src-line"><a name="a58"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/techniques.php&nbsp;Looping/Iteration&nbsp;techniques</span></div></li>
<li><div class="src-line"><a name="a59"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a60"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;QueryPath</span></div></li>
<li><div class="src-line"><a name="a61"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;M&nbsp;Butcher&nbsp;&lt;matt&nbsp;@aleph-null.tv&gt;</span></div></li>
<li><div class="src-line"><a name="a62"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@license</span><span class="src-doc">&nbsp;http://opensource.org/licenses/lgpl-2.1.php&nbsp;The&nbsp;GNU&nbsp;Lesser&nbsp;GPL&nbsp;(LGPL)&nbsp;or&nbsp;an&nbsp;MIT-like&nbsp;license.</span></div></li>
<li><div class="src-line"><a name="a63"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;QueryPath</span></div></li>
<li><div class="src-line"><a name="a64"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;qp()</span></div></li>
<li><div class="src-line"><a name="a65"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@copyright</span><span class="src-doc">&nbsp;Copyright&nbsp;(c)&nbsp;2009,&nbsp;Matt&nbsp;Butcher.</span></div></li>
<li><div class="src-line"><a name="a66"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a67"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a68"></a><span class="src-comm">//define('QUICK_EXP',&nbsp;'/^[^&lt;]*(&lt;(.|\s)+&gt;)[^&gt;]*$|^#([\w-]+)$/');</span></div></li>
<li><div class="src-line"><a name="a69"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a70"></a><span class="src-doc">&nbsp;*&nbsp;Regular&nbsp;expression&nbsp;for&nbsp;checking&nbsp;whether&nbsp;a&nbsp;string&nbsp;looks&nbsp;like&nbsp;XML.</span></div></li>
<li><div class="src-line"><a name="a71"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a72"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'ML_EXP'</span><span class="src-sym">,</span><span class="src-str">'/^[^&lt;]*(&lt;(.|\s)+&gt;)[^&gt;]*$/'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a73"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a74"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a75"></a><span class="src-doc">&nbsp;*&nbsp;The&nbsp;main&nbsp;implementation&nbsp;of&nbsp;Query&nbsp;Path&nbsp;is&nbsp;stored&nbsp;in&nbsp;the&nbsp;QueryPathImple.php&nbsp;file.</span></div></li>
<li><div class="src-line"><a name="a76"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a77"></a><span class="src-inc">require_once&nbsp;</span><span class="src-str">'QueryPathImpl.php'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a78"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a79"></a><span class="src-doc">&nbsp;*&nbsp;The&nbsp;CssEventHandler&nbsp;interfaces&nbsp;with&nbsp;the&nbsp;CSS&nbsp;parser.</span></div></li>
<li><div class="src-line"><a name="a80"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a81"></a><span class="src-inc">require_once&nbsp;</span><span class="src-str">'CssEventHandler.php'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a82"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a83"></a><span class="src-doc">&nbsp;*&nbsp;The&nbsp;extender&nbsp;is&nbsp;used&nbsp;to&nbsp;provide&nbsp;support&nbsp;for&nbsp;extensions.</span></div></li>
<li><div class="src-line"><a name="a84"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a85"></a><span class="src-inc">require_once&nbsp;</span><span class="src-str">'QueryPathExtension.php'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a86"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a87"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a88"></a><span class="src-doc">&nbsp;*&nbsp;Build&nbsp;a&nbsp;new&nbsp;Query&nbsp;Path.</span></div></li>
<li><div class="src-line"><a name="a89"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;builds&nbsp;a&nbsp;new&nbsp;Query&nbsp;Path&nbsp;object.&nbsp;The&nbsp;new&nbsp;object&nbsp;can&nbsp;be&nbsp;used&nbsp;for</span></div></li>
<li><div class="src-line"><a name="a90"></a><span class="src-doc">&nbsp;*&nbsp;reading,&nbsp;search,&nbsp;and&nbsp;modifying&nbsp;a&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a91"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a92"></a><span class="src-doc">&nbsp;*&nbsp;While&nbsp;it&nbsp;is&nbsp;permissible&nbsp;to&nbsp;directly&nbsp;create&nbsp;new&nbsp;instances&nbsp;of&nbsp;a&nbsp;QueryPath</span></div></li>
<li><div class="src-line"><a name="a93"></a><span class="src-doc">&nbsp;*&nbsp;implementation,&nbsp;it&nbsp;is&nbsp;not&nbsp;advised.&nbsp;Instead,&nbsp;you&nbsp;should&nbsp;use&nbsp;this&nbsp;function</span></div></li>
<li><div class="src-line"><a name="a94"></a><span class="src-doc">&nbsp;*&nbsp;as&nbsp;a&nbsp;factory.</span></div></li>
<li><div class="src-line"><a name="a95"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a96"></a><span class="src-doc">&nbsp;*&nbsp;Example:</span></div></li>
<li><div class="src-line"><a name="a97"></a><span class="src-doc">&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a98"></a><span class="src-doc">&nbsp;*&nbsp;&lt;?php</span></div></li>
<li><div class="src-line"><a name="a99"></a><span class="src-doc">&nbsp;*&nbsp;qp();&nbsp;//&nbsp;New&nbsp;empty&nbsp;QueryPath</span></div></li>
<li><div class="src-line"><a name="a100"></a><span class="src-doc">&nbsp;*&nbsp;qp('path/to/file.xml');&nbsp;//&nbsp;From&nbsp;a&nbsp;file</span></div></li>
<li><div class="src-line"><a name="a101"></a><span class="src-doc">&nbsp;*&nbsp;qp('&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;');&nbsp;//&nbsp;From&nbsp;HTML&nbsp;or&nbsp;XML</span></div></li>
<li><div class="src-line"><a name="a102"></a><span class="src-doc">&nbsp;*&nbsp;qp(QueryPath::HTML_STUB);&nbsp;//&nbsp;From&nbsp;a&nbsp;basic&nbsp;HTML&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a103"></a><span class="src-doc">&nbsp;*&nbsp;qp(QueryPath::HTML_STUB,&nbsp;'title');&nbsp;//&nbsp;Create&nbsp;one&nbsp;from&nbsp;a&nbsp;basic&nbsp;HTML&nbsp;doc&nbsp;and&nbsp;position&nbsp;it&nbsp;at&nbsp;the&nbsp;title&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a104"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a105"></a><span class="src-doc">&nbsp;*&nbsp;//&nbsp;Most&nbsp;of&nbsp;the&nbsp;time,&nbsp;methods&nbsp;are&nbsp;chained&nbsp;directly&nbsp;off&nbsp;of&nbsp;this&nbsp;call.</span></div></li>
<li><div class="src-line"><a name="a106"></a><span class="src-doc">&nbsp;*&nbsp;qp(QueryPath::HTML_STUB,&nbsp;'body')-&gt;append('&lt;h1&gt;Title&lt;/h1&gt;')-&gt;addClass('body-class');</span></div></li>
<li><div class="src-line"><a name="a107"></a><span class="src-doc">&nbsp;*&nbsp;?&gt;</span></div></li>
<li><div class="src-line"><a name="a108"></a><span class="src-doc">&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a109"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a110"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;function&nbsp;is&nbsp;used&nbsp;internally&nbsp;by&nbsp;QueryPath.&nbsp;Anything&nbsp;that&nbsp;modifies&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a111"></a><span class="src-doc">&nbsp;*&nbsp;behavior&nbsp;of&nbsp;this&nbsp;function&nbsp;may&nbsp;also&nbsp;modify&nbsp;the&nbsp;behavior&nbsp;of&nbsp;common&nbsp;QueryPath</span></div></li>
<li><div class="src-line"><a name="a112"></a><span class="src-doc">&nbsp;*&nbsp;methods.</span></div></li>
<li><div class="src-line"><a name="a113"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a114"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span><span class="src-doc-var">$document&nbsp;</span></div></li>
<li><div class="src-line"><a name="a115"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;document&nbsp;in&nbsp;one&nbsp;of&nbsp;the&nbsp;following&nbsp;forms:</span></div></li>
<li><div class="src-line"><a name="a116"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;-&nbsp;A&nbsp;string&nbsp;of&nbsp;XML&nbsp;or&nbsp;HTML&nbsp;(See&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;HTML_STUB}</span><span class="src-doc">)</span></div></li>
<li><div class="src-line"><a name="a117"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;-&nbsp;A&nbsp;path&nbsp;on&nbsp;the&nbsp;file&nbsp;system&nbsp;or&nbsp;a&nbsp;URL</span></div></li>
<li><div class="src-line"><a name="a118"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;-&nbsp;A&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;DOMDocument}</span><span class="src-doc">&nbsp;object</span></div></li>
<li><div class="src-line"><a name="a119"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;-&nbsp;A&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;SimpleXMLElement}</span><span class="src-doc">&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a120"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;-&nbsp;A&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;DOMNode}</span><span class="src-doc">&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a121"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;-&nbsp;An&nbsp;array&nbsp;of&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;DOMNode}</span><span class="src-doc">&nbsp;objects&nbsp;(generally&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;DOMElement}</span><span class="src-doc">&nbsp;nodes).</span></div></li>
<li><div class="src-line"><a name="a122"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;-&nbsp;Another&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;QueryPath}</span><span class="src-doc">&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a123"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a124"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;Keep&nbsp;in&nbsp;mind&nbsp;that&nbsp;most&nbsp;features&nbsp;of&nbsp;QueryPath&nbsp;operate&nbsp;on&nbsp;elements.&nbsp;Other</span></div></li>
<li><div class="src-line"><a name="a125"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;sorts&nbsp;of&nbsp;DOMNodes&nbsp;might&nbsp;not&nbsp;work&nbsp;with&nbsp;all&nbsp;features.</span></div></li>
<li><div class="src-line"><a name="a126"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$string&nbsp;</span></div></li>
<li><div class="src-line"><a name="a127"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;CSS&nbsp;3&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a128"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$options&nbsp;</span></div></li>
<li><div class="src-line"><a name="a129"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;An&nbsp;associative&nbsp;array&nbsp;of&nbsp;options.&nbsp;Currently&nbsp;supported&nbsp;options&nbsp;are:</span></div></li>
<li><div class="src-line"><a name="a130"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;-&nbsp;context:&nbsp;A&nbsp;stream&nbsp;context&nbsp;object.&nbsp;This&nbsp;is&nbsp;used&nbsp;to&nbsp;pass&nbsp;context&nbsp;info</span></div></li>
<li><div class="src-line"><a name="a131"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;the&nbsp;underlying&nbsp;file&nbsp;IO&nbsp;subsystem.</span></div></li>
<li><div class="src-line"><a name="a132"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;-&nbsp;parser_flags:&nbsp;An&nbsp;OR-combined&nbsp;set&nbsp;of&nbsp;parser&nbsp;flags.&nbsp;The&nbsp;flags&nbsp;supported</span></div></li>
<li><div class="src-line"><a name="a133"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by&nbsp;the&nbsp;DOMDocument&nbsp;PHP&nbsp;class&nbsp;are&nbsp;all&nbsp;supported&nbsp;here.</span></div></li>
<li><div class="src-line"><a name="a134"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a135"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/simple_example.php&nbsp;Basic&nbsp;Example</span></div></li>
<li><div class="src-line"><a name="a136"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/html.php&nbsp;Generating&nbsp;HTML</span></div></li>
<li><div class="src-line"><a name="a137"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/xml.php&nbsp;Using&nbsp;XML</span></div></li>
<li><div class="src-line"><a name="a138"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/rss.php&nbsp;Generating&nbsp;RSS&nbsp;(Really&nbsp;Simple&nbsp;Syndication)</span></div></li>
<li><div class="src-line"><a name="a139"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/svg.php&nbsp;Working&nbsp;with&nbsp;SVG&nbsp;(Scalable&nbsp;Vector&nbsp;Graphics)</span></div></li>
<li><div class="src-line"><a name="a140"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/musicbrainz.php&nbsp;Working&nbsp;with&nbsp;remote&nbsp;XML&nbsp;documents</span></div></li>
<li><div class="src-line"><a name="a141"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/sparql.php&nbsp;Working&nbsp;with&nbsp;SPARQL&nbsp;queries</span></div></li>
<li><div class="src-line"><a name="a142"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/dbpedia.php&nbsp;Working&nbsp;with&nbsp;namespaced&nbsp;XML</span></div></li>
<li><div class="src-line"><a name="a143"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;examples/techniques.php&nbsp;Looping/Iteration&nbsp;techniques</span></div></li>
<li><div class="src-line"><a name="a144"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a145"></a><span class="src-key">function&nbsp;</span><a href="../QueryPath/_src---QueryPath---QueryPath.php.html#functionqp">qp</a><span class="src-sym">(</span><span class="src-var">$document&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-var">$string&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-var">$options&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a146"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;Todo:&nbsp;Make&nbsp;this&nbsp;an&nbsp;abstract&nbsp;factory.</span></div></li>
<li><div class="src-line"><a name="a147"></a>&nbsp;&nbsp;<span class="src-var">$qp&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../QueryPath/Internals/QueryPathImpl.html">QueryPathImpl</a></span><span class="src-sym">(</span><span class="src-var">$document</span><span class="src-sym">,&nbsp;</span><span class="src-var">$string</span><span class="src-sym">,&nbsp;</span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a148"></a>&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$qp</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a149"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a150"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a151"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a152"></a><span class="src-doc">&nbsp;*&nbsp;The&nbsp;Query&nbsp;Path&nbsp;object&nbsp;is&nbsp;the&nbsp;primary&nbsp;tool&nbsp;in&nbsp;this&nbsp;library.</span></div></li>
<li><div class="src-line"><a name="a153"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a154"></a><span class="src-doc">&nbsp;*&nbsp;To&nbsp;create&nbsp;a&nbsp;new&nbsp;Query&nbsp;Path,&nbsp;use&nbsp;the&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;qp()}</span><span class="src-doc">&nbsp;function.</span></div></li>
<li><div class="src-line"><a name="a155"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a156"></a><span class="src-doc">&nbsp;*&nbsp;If&nbsp;you&nbsp;are&nbsp;new&nbsp;to&nbsp;these&nbsp;documents,&nbsp;start&nbsp;at&nbsp;the&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;QueryPath.php}</span><span class="src-doc">&nbsp;page.</span></div></li>
<li><div class="src-line"><a name="a157"></a><span class="src-doc">&nbsp;*&nbsp;There&nbsp;you&nbsp;will&nbsp;find&nbsp;a&nbsp;quick&nbsp;guide&nbsp;to&nbsp;the&nbsp;tools&nbsp;contained&nbsp;in&nbsp;this&nbsp;project.</span></div></li>
<li><div class="src-line"><a name="a158"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a159"></a><span class="src-doc">&nbsp;*&nbsp;A&nbsp;note&nbsp;on&nbsp;serialization:&nbsp;QueryPath&nbsp;uses&nbsp;DOM&nbsp;classes&nbsp;internally,&nbsp;and&nbsp;those</span></div></li>
<li><div class="src-line"><a name="a160"></a><span class="src-doc">&nbsp;*&nbsp;do&nbsp;not&nbsp;serialize&nbsp;well&nbsp;at&nbsp;all.&nbsp;In&nbsp;addition,&nbsp;QueryPath&nbsp;may&nbsp;contain&nbsp;many</span></div></li>
<li><div class="src-line"><a name="a161"></a><span class="src-doc">&nbsp;*&nbsp;extensions,&nbsp;and&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;that&nbsp;extensions&nbsp;can&nbsp;serialize.&nbsp;The</span></div></li>
<li><div class="src-line"><a name="a162"></a><span class="src-doc">&nbsp;*&nbsp;moral&nbsp;of&nbsp;the&nbsp;story:&nbsp;Don't&nbsp;serialize&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a163"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a164"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;qp()</span></div></li>
<li><div class="src-line"><a name="a165"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;QueryPath.php</span></div></li>
<li><div class="src-line"><a name="a166"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a167"></a><span class="src-key">interface&nbsp;</span><a href="../QueryPath/QueryPath.html">QueryPath</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a168"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a169"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a170"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;is&nbsp;a&nbsp;stub&nbsp;HTML&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a171"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a172"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;It&nbsp;can&nbsp;be&nbsp;passed&nbsp;into&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;qp()}</span><span class="src-doc">&nbsp;to&nbsp;begin&nbsp;a&nbsp;new&nbsp;basic&nbsp;HTML&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a173"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a174"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">HTML_STUB&nbsp;</span>=&nbsp;<span class="src-str">'&lt;?xml&nbsp;version=&quot;1.0&quot;?&gt;</span></div></li>
<li><div class="src-line"><a name="a175"></a><span class="src-str">&nbsp;&nbsp;&lt;!DOCTYPE&nbsp;html&nbsp;PUBLIC&nbsp;&quot;-//W3C//DTD&nbsp;XHTML&nbsp;1.0&nbsp;Strict//EN&quot;&nbsp;&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span></div></li>
<li><div class="src-line"><a name="a176"></a><span class="src-str">&nbsp;&nbsp;&lt;html&nbsp;xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;</span></div></li>
<li><div class="src-line"><a name="a177"></a><span class="src-str">&nbsp;&nbsp;&lt;head&gt;</span></div></li>
<li><div class="src-line"><a name="a178"></a><span class="src-str">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;meta&nbsp;http-equiv=&quot;Content-Type&quot;&nbsp;content=&quot;text/html;&nbsp;charset=utf-8&quot;/&gt;</span></div></li>
<li><div class="src-line"><a name="a179"></a><span class="src-str">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;Untitled&lt;/title&gt;</span></div></li>
<li><div class="src-line"><a name="a180"></a><span class="src-str">&nbsp;&nbsp;&lt;/head&gt;</span></div></li>
<li><div class="src-line"><a name="a181"></a><span class="src-str">&nbsp;&nbsp;&lt;body&gt;&lt;/body&gt;</span></div></li>
<li><div class="src-line"><a name="a182"></a><span class="src-str">&nbsp;&nbsp;&lt;/html&gt;'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a183"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a184"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a185"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Given&nbsp;a&nbsp;CSS&nbsp;Selector,&nbsp;find&nbsp;matching&nbsp;items.</span></div></li>
<li><div class="src-line"><a name="a186"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a187"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a188"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;CSS&nbsp;3&nbsp;Selector</span></div></li>
<li><div class="src-line"><a name="a189"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a190"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;filter()</span></div></li>
<li><div class="src-line"><a name="a191"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;is()</span></div></li>
<li><div class="src-line"><a name="a192"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@todo</span><span class="src-doc">&nbsp;If&nbsp;a&nbsp;find()&nbsp;returns&nbsp;zero&nbsp;matches,&nbsp;then&nbsp;a&nbsp;subsequent&nbsp;find()&nbsp;will</span></div></li>
<li><div class="src-line"><a name="a193"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;also&nbsp;return&nbsp;zero&nbsp;matches,&nbsp;even&nbsp;if&nbsp;that&nbsp;find&nbsp;has&nbsp;a&nbsp;selector&nbsp;like&nbsp;:root.</span></div></li>
<li><div class="src-line"><a name="a194"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;reason&nbsp;for&nbsp;this&nbsp;is&nbsp;that&nbsp;the&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;QueryPathCssEventHandler}</span><span class="src-doc">&nbsp;does</span></div></li>
<li><div class="src-line"><a name="a195"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;not&nbsp;set&nbsp;the&nbsp;root&nbsp;of&nbsp;the&nbsp;document&nbsp;tree&nbsp;if&nbsp;it&nbsp;cannot&nbsp;find&nbsp;any&nbsp;elements</span></div></li>
<li><div class="src-line"><a name="a196"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;from&nbsp;which&nbsp;to&nbsp;determine&nbsp;what&nbsp;the&nbsp;root&nbsp;is.&nbsp;The&nbsp;workaround&nbsp;is&nbsp;to&nbsp;use</span></div></li>
<li><div class="src-line"><a name="a197"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;top()}</span><span class="src-doc">&nbsp;to&nbsp;select&nbsp;the&nbsp;root&nbsp;element&nbsp;again.</span></div></li>
<li><div class="src-line"><a name="a198"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a199"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodfind">find</a><span class="src-sym">(</span><span class="src-var">$selector</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a200"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a201"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a202"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Execute&nbsp;an&nbsp;XPath&nbsp;query&nbsp;and&nbsp;store&nbsp;the&nbsp;results&nbsp;in&nbsp;the&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a203"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a204"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Most&nbsp;methods&nbsp;in&nbsp;this&nbsp;class&nbsp;support&nbsp;CSS&nbsp;3&nbsp;Selectors.&nbsp;Sometimes,&nbsp;though,</span></div></li>
<li><div class="src-line"><a name="a205"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;XPath&nbsp;provides&nbsp;a&nbsp;finer-grained&nbsp;query&nbsp;language.&nbsp;Use&nbsp;this&nbsp;to&nbsp;execute</span></div></li>
<li><div class="src-line"><a name="a206"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;XPath&nbsp;queries.</span></div></li>
<li><div class="src-line"><a name="a207"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a208"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Beware,&nbsp;though.&nbsp;QueryPath&nbsp;works&nbsp;best&nbsp;on&nbsp;DOM&nbsp;Elements,&nbsp;but&nbsp;an&nbsp;XPath</span></div></li>
<li><div class="src-line"><a name="a209"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;query&nbsp;can&nbsp;return&nbsp;other&nbsp;nodes,&nbsp;strings,&nbsp;and&nbsp;values.&nbsp;These&nbsp;may&nbsp;not&nbsp;work&nbsp;with</span></div></li>
<li><div class="src-line"><a name="a210"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;other&nbsp;QueryPath&nbsp;functions&nbsp;(though&nbsp;you&nbsp;will&nbsp;be&nbsp;able&nbsp;to&nbsp;access&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a211"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;values&nbsp;with&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;get()}</span><span class="src-doc">).</span></div></li>
<li><div class="src-line"><a name="a212"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a213"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$query&nbsp;</span></div></li>
<li><div class="src-line"><a name="a214"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;An&nbsp;XPath&nbsp;query.</span></div></li>
<li><div class="src-line"><a name="a215"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a216"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;QueryPath&nbsp;object&nbsp;wrapping&nbsp;the&nbsp;results&nbsp;of&nbsp;the&nbsp;query.</span></div></li>
<li><div class="src-line"><a name="a217"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;find()</span></div></li>
<li><div class="src-line"><a name="a218"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a219"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodxpath">xpath</a><span class="src-sym">(</span><span class="src-var">$query</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a220"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a221"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a222"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Select&nbsp;the&nbsp;root&nbsp;element&nbsp;of&nbsp;the&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a223"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a224"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;sets&nbsp;the&nbsp;current&nbsp;match&nbsp;to&nbsp;the&nbsp;document's&nbsp;root&nbsp;element.&nbsp;For</span></div></li>
<li><div class="src-line"><a name="a225"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;practical&nbsp;purposes,&nbsp;this&nbsp;is&nbsp;the&nbsp;same&nbsp;as:</span></div></li>
<li><div class="src-line"><a name="a226"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a227"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;qp($someDoc)-&gt;find(':root');</span></div></li>
<li><div class="src-line"><a name="a228"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a229"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;However,&nbsp;since&nbsp;it&nbsp;doesn't&nbsp;invoke&nbsp;a&nbsp;parser,&nbsp;it&nbsp;has&nbsp;less&nbsp;overhead.&nbsp;It&nbsp;also</span></div></li>
<li><div class="src-line"><a name="a230"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;works&nbsp;in&nbsp;cases&nbsp;where&nbsp;the&nbsp;QueryPath&nbsp;has&nbsp;been&nbsp;reduced&nbsp;to&nbsp;zero&nbsp;elements&nbsp;(a</span></div></li>
<li><div class="src-line"><a name="a231"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;case&nbsp;that&nbsp;is&nbsp;not&nbsp;handled&nbsp;by&nbsp;find(':root')&nbsp;because&nbsp;there&nbsp;is&nbsp;no&nbsp;element</span></div></li>
<li><div class="src-line"><a name="a232"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;whose&nbsp;root&nbsp;can&nbsp;be&nbsp;found).</span></div></li>
<li><div class="src-line"><a name="a233"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a234"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a235"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object,&nbsp;wrapping&nbsp;the&nbsp;root&nbsp;element&nbsp;(document&nbsp;element)</span></div></li>
<li><div class="src-line"><a name="a236"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;for&nbsp;the&nbsp;current&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a237"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a238"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodtop">top</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a239"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a240"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a241"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;the&nbsp;number&nbsp;of&nbsp;elements&nbsp;currently&nbsp;wrapped&nbsp;by&nbsp;this&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a242"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a243"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Note&nbsp;that&nbsp;there&nbsp;is&nbsp;no&nbsp;length&nbsp;property&nbsp;on&nbsp;this&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a244"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a245"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">int&nbsp;</span></div></li>
<li><div class="src-line"><a name="a246"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Number&nbsp;of&nbsp;items&nbsp;in&nbsp;the&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a247"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a248"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodsize">size</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a249"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a250"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a251"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;one&nbsp;or&nbsp;all&nbsp;elements&nbsp;from&nbsp;this&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a252"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a253"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;When&nbsp;called&nbsp;with&nbsp;no&nbsp;paramaters,&nbsp;this&nbsp;returns&nbsp;all&nbsp;objects&nbsp;wrapped&nbsp;by</span></div></li>
<li><div class="src-line"><a name="a254"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;QueryPath.&nbsp;Typically,&nbsp;these&nbsp;are&nbsp;DOMElement&nbsp;objects&nbsp;(unless&nbsp;you&nbsp;have</span></div></li>
<li><div class="src-line"><a name="a255"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;used&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;map()}</span><span class="src-doc">,&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;xpath()}</span><span class="src-doc">,&nbsp;or&nbsp;other&nbsp;methods&nbsp;that&nbsp;can&nbsp;select</span></div></li>
<li><div class="src-line"><a name="a256"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;non-elements).</span></div></li>
<li><div class="src-line"><a name="a257"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a258"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;When&nbsp;called&nbsp;with&nbsp;an&nbsp;index,&nbsp;it&nbsp;will&nbsp;return&nbsp;the&nbsp;item&nbsp;in&nbsp;the&nbsp;QueryPath&nbsp;with</span></div></li>
<li><div class="src-line"><a name="a259"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;that&nbsp;index&nbsp;number.</span></div></li>
<li><div class="src-line"><a name="a260"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a261"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Calling&nbsp;this&nbsp;method&nbsp;does&nbsp;not&nbsp;change&nbsp;the&nbsp;QueryPath&nbsp;(e.g.&nbsp;it&nbsp;is</span></div></li>
<li><div class="src-line"><a name="a262"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;non-destructive).</span></div></li>
<li><div class="src-line"><a name="a263"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a264"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;You&nbsp;can&nbsp;use&nbsp;qp()-&gt;get()&nbsp;to&nbsp;iterate&nbsp;over&nbsp;all&nbsp;elements&nbsp;matched.&nbsp;You&nbsp;can</span></div></li>
<li><div class="src-line"><a name="a265"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;also&nbsp;iterate&nbsp;over&nbsp;qp()&nbsp;itself&nbsp;(QueryPath&nbsp;implementations&nbsp;must&nbsp;be&nbsp;Traversable).</span></div></li>
<li><div class="src-line"><a name="a266"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;In&nbsp;the&nbsp;later&nbsp;case,&nbsp;though,&nbsp;each&nbsp;item</span></div></li>
<li><div class="src-line"><a name="a267"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;will&nbsp;be&nbsp;wrapped&nbsp;in&nbsp;a&nbsp;QueryPath&nbsp;object.&nbsp;To&nbsp;learn&nbsp;more&nbsp;about&nbsp;iterating</span></div></li>
<li><div class="src-line"><a name="a268"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;in&nbsp;QueryPath,&nbsp;see&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;examples/techniques.php}</span><span class="src-doc">.</span></div></li>
<li><div class="src-line"><a name="a269"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a270"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">int&nbsp;</span><span class="src-doc-var">$index&nbsp;</span></div></li>
<li><div class="src-line"><a name="a271"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;specified,&nbsp;then&nbsp;only&nbsp;this&nbsp;index&nbsp;value&nbsp;will&nbsp;be&nbsp;returned.&nbsp;If&nbsp;this</span></div></li>
<li><div class="src-line"><a name="a272"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;index&nbsp;is&nbsp;out&nbsp;of&nbsp;bounds,&nbsp;a&nbsp;NULL&nbsp;will&nbsp;be&nbsp;returned.</span></div></li>
<li><div class="src-line"><a name="a273"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span></div></li>
<li><div class="src-line"><a name="a274"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;an&nbsp;index&nbsp;is&nbsp;passed,&nbsp;one&nbsp;element&nbsp;will&nbsp;be&nbsp;returned.&nbsp;If&nbsp;no&nbsp;index&nbsp;is</span></div></li>
<li><div class="src-line"><a name="a275"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;present,&nbsp;an&nbsp;array&nbsp;of&nbsp;all&nbsp;matches&nbsp;will&nbsp;be&nbsp;returned.</span></div></li>
<li><div class="src-line"><a name="a276"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;eq()</span></div></li>
<li><div class="src-line"><a name="a277"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a278"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodget">get</a><span class="src-sym">(</span><span class="src-var">$index&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a279"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a280"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a281"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;an&nbsp;iterator&nbsp;for&nbsp;items&nbsp;in&nbsp;this&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a282"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a283"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;While&nbsp;you&nbsp;don't&nbsp;need&nbsp;to&nbsp;call&nbsp;this,&nbsp;it&nbsp;makes&nbsp;it&nbsp;possible&nbsp;to&nbsp;do&nbsp;this:</span></div></li>
<li><div class="src-line"><a name="a284"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a285"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a286"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;?php</span></div></li>
<li><div class="src-line"><a name="a287"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;$qp&nbsp;=&nbsp;qp($someXML,&nbsp;'li');</span></div></li>
<li><div class="src-line"><a name="a288"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;foreach&nbsp;($qp&nbsp;as&nbsp;$li)&nbsp;{</span></div></li>
<li><div class="src-line"><a name="a289"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;//&nbsp;$li&nbsp;is&nbsp;a&nbsp;QueryPath&nbsp;pointing&nbsp;to&nbsp;only&nbsp;one&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a290"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;print&nbsp;$i-&gt;text();</span></div></li>
<li><div class="src-line"><a name="a291"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;}</span></div></li>
<li><div class="src-line"><a name="a292"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;?&gt;</span></div></li>
<li><div class="src-line"><a name="a293"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a294"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a295"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;You&nbsp;will&nbsp;not&nbsp;typically&nbsp;have&nbsp;to&nbsp;call&nbsp;this&nbsp;function&nbsp;directly.&nbsp;It&nbsp;is&nbsp;called</span></div></li>
<li><div class="src-line"><a name="a296"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;implicitly&nbsp;by&nbsp;functions&nbsp;and&nbsp;control&nbsp;structures.</span></div></li>
<li><div class="src-line"><a name="a297"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a298"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;QueryPath&nbsp;is&nbsp;capable&nbsp;of&nbsp;delivering&nbsp;two&nbsp;different&nbsp;iterable&nbsp;objects.&nbsp;The&nbsp;first</span></div></li>
<li><div class="src-line"><a name="a299"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;is&nbsp;the&nbsp;array&nbsp;(okay,&nbsp;technically&nbsp;not&nbsp;an&nbsp;object)&nbsp;of&nbsp;DOMNodes&nbsp;that&nbsp;QueryPath</span></div></li>
<li><div class="src-line"><a name="a300"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;wraps.&nbsp;This&nbsp;is&nbsp;done&nbsp;using&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;get()}</span><span class="src-doc">.&nbsp;The&nbsp;second&nbsp;is&nbsp;an</span></div></li>
<li><div class="src-line"><a name="a301"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;IteratorAgregator}</span><span class="src-doc">&nbsp;that&nbsp;provides&nbsp;each&nbsp;item&nbsp;wrapped&nbsp;as&nbsp;a&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a302"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;function&nbsp;provides&nbsp;the&nbsp;latter&nbsp;functionality.</span></div></li>
<li><div class="src-line"><a name="a303"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a304"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;To&nbsp;illustrate&nbsp;the&nbsp;different:</span></div></li>
<li><div class="src-line"><a name="a305"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a306"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;?php</span></div></li>
<li><div class="src-line"><a name="a307"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;$qp&nbsp;=&nbsp;qp($someXML,&nbsp;'li');</span></div></li>
<li><div class="src-line"><a name="a308"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;foreach&nbsp;($qp-&gt;get()&nbsp;as&nbsp;$node)&nbsp;{</span></div></li>
<li><div class="src-line"><a name="a309"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;//&nbsp;$node&nbsp;is&nbsp;a&nbsp;DOMNode,&nbsp;usually&nbsp;a&nbsp;DOMElement</span></div></li>
<li><div class="src-line"><a name="a310"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;print&nbsp;$node-&gt;tagName;</span></div></li>
<li><div class="src-line"><a name="a311"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;}</span></div></li>
<li><div class="src-line"><a name="a312"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a313"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;foreach&nbsp;($qp&nbsp;as&nbsp;$item)&nbsp;{</span></div></li>
<li><div class="src-line"><a name="a314"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;//&nbsp;$item&nbsp;is&nbsp;a&nbsp;QueryPath&nbsp;pointing&nbsp;to&nbsp;just&nbsp;one&nbsp;&lt;li&gt;&nbsp;element&nbsp;at&nbsp;a&nbsp;time.</span></div></li>
<li><div class="src-line"><a name="a315"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;print&nbsp;$node-&gt;tag()</span></div></li>
<li><div class="src-line"><a name="a316"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;}</span></div></li>
<li><div class="src-line"><a name="a317"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;?&gt;</span></div></li>
<li><div class="src-line"><a name="a318"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a319"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a320"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@returns</span><span class="src-doc">&nbsp;QueryPathIterator</span></div></li>
<li><div class="src-line"><a name="a321"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;An&nbsp;iterator&nbsp;with&nbsp;all&nbsp;of&nbsp;the&nbsp;features&nbsp;of&nbsp;an&nbsp;ArrayIterator.</span></div></li>
<li><div class="src-line"><a name="a322"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a323"></a>&nbsp;&nbsp;<span class="src-comm">//public&nbsp;function&nbsp;getIterator();</span></div></li>
<li><div class="src-line"><a name="a324"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a325"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a326"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Reduce&nbsp;the&nbsp;matched&nbsp;set&nbsp;to&nbsp;just&nbsp;one.</span></div></li>
<li><div class="src-line"><a name="a327"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a328"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;will&nbsp;take&nbsp;a&nbsp;matched&nbsp;set&nbsp;and&nbsp;reduce&nbsp;it&nbsp;to&nbsp;just&nbsp;one&nbsp;item&nbsp;--&nbsp;the&nbsp;item</span></div></li>
<li><div class="src-line"><a name="a329"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;at&nbsp;the&nbsp;index&nbsp;specified.&nbsp;This&nbsp;is&nbsp;a&nbsp;destructive&nbsp;operation,&nbsp;and&nbsp;can&nbsp;be&nbsp;undone</span></div></li>
<li><div class="src-line"><a name="a330"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;with&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;end()}</span><span class="src-doc">.</span></div></li>
<li><div class="src-line"><a name="a331"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a332"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$index&nbsp;</span></div></li>
<li><div class="src-line"><a name="a333"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;</span><span class="src-doc">The&nbsp;index&nbsp;of&nbsp;the&nbsp;element&nbsp;to&nbsp;keep.&nbsp;The&nbsp;rest&nbsp;will&nbsp;be</span></div></li>
<li><div class="src-line"><a name="a334"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;discarded.</span></div></li>
<li><div class="src-line"><a name="a335"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a336"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;get()</span></div></li>
<li><div class="src-line"><a name="a337"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;is()</span></div></li>
<li><div class="src-line"><a name="a338"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;end()</span></div></li>
<li><div class="src-line"><a name="a339"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a340"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodeq">eq</a><span class="src-sym">(</span><span class="src-var">$index</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a341"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a342"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a343"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get/set&nbsp;an&nbsp;attribute.</span></div></li>
<li><div class="src-line"><a name="a344"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;If&nbsp;both&nbsp;name&nbsp;and&nbsp;value&nbsp;are&nbsp;set,&nbsp;then&nbsp;this&nbsp;will&nbsp;set&nbsp;the&nbsp;attribute&nbsp;name/value</span></div></li>
<li><div class="src-line"><a name="a345"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;pair&nbsp;for&nbsp;all&nbsp;items&nbsp;in&nbsp;this&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a346"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;If&nbsp;name&nbsp;is&nbsp;set,&nbsp;and&nbsp;is&nbsp;an&nbsp;array,&nbsp;then</span></div></li>
<li><div class="src-line"><a name="a347"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;all&nbsp;attributes&nbsp;in&nbsp;the&nbsp;array&nbsp;will&nbsp;be&nbsp;set&nbsp;for&nbsp;all&nbsp;items&nbsp;in&nbsp;this&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a348"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;If&nbsp;name&nbsp;is&nbsp;a&nbsp;string&nbsp;and&nbsp;is&nbsp;set,&nbsp;then&nbsp;the&nbsp;attribute&nbsp;value&nbsp;will&nbsp;be&nbsp;returned.</span></div></li>
<li><div class="src-line"><a name="a349"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a350"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;When&nbsp;an&nbsp;attribute&nbsp;value&nbsp;is&nbsp;retrieved,&nbsp;only&nbsp;the&nbsp;attribute&nbsp;value&nbsp;of&nbsp;the&nbsp;FIRST</span></div></li>
<li><div class="src-line"><a name="a351"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;match&nbsp;is&nbsp;returned.</span></div></li>
<li><div class="src-line"><a name="a352"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a353"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span><span class="src-doc-var">$name&nbsp;</span></div></li>
<li><div class="src-line"><a name="a354"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;name&nbsp;of&nbsp;the&nbsp;attribute&nbsp;or&nbsp;an&nbsp;associative&nbsp;array&nbsp;of&nbsp;name/value&nbsp;pairs.</span></div></li>
<li><div class="src-line"><a name="a355"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span></div></li>
<li><div class="src-line"><a name="a356"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;A&nbsp;value&nbsp;(used&nbsp;only&nbsp;when&nbsp;setting&nbsp;an&nbsp;individual&nbsp;property).</span></div></li>
<li><div class="src-line"><a name="a357"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span></div></li>
<li><div class="src-line"><a name="a358"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;this&nbsp;was&nbsp;a&nbsp;setter&nbsp;request,&nbsp;return&nbsp;the&nbsp;QueryPath&nbsp;object.&nbsp;If&nbsp;this&nbsp;was</span></div></li>
<li><div class="src-line"><a name="a359"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;an&nbsp;access&nbsp;request&nbsp;(getter),&nbsp;return&nbsp;the&nbsp;string&nbsp;value.</span></div></li>
<li><div class="src-line"><a name="a360"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;removeAttr()</span></div></li>
<li><div class="src-line"><a name="a361"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;tag()</span></div></li>
<li><div class="src-line"><a name="a362"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a363"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodattr">attr</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a364"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a365"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a366"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Remove&nbsp;the&nbsp;named&nbsp;attribute&nbsp;from&nbsp;all&nbsp;elements&nbsp;in&nbsp;the&nbsp;current&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a367"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a368"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;will&nbsp;remove&nbsp;any&nbsp;attribute&nbsp;with&nbsp;the&nbsp;given&nbsp;name.&nbsp;It&nbsp;will&nbsp;do&nbsp;this&nbsp;on&nbsp;each</span></div></li>
<li><div class="src-line"><a name="a369"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;item&nbsp;currently&nbsp;wrapped&nbsp;by&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a370"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a371"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;As&nbsp;is&nbsp;the&nbsp;case&nbsp;in&nbsp;jQuery,&nbsp;this&nbsp;operation&nbsp;is&nbsp;not&nbsp;considered&nbsp;destructive.</span></div></li>
<li><div class="src-line"><a name="a372"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a373"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span></div></li>
<li><div class="src-line"><a name="a374"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Name&nbsp;of&nbsp;the&nbsp;parameter&nbsp;to&nbsp;remove.</span></div></li>
<li><div class="src-line"><a name="a375"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a376"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object&nbsp;with&nbsp;the&nbsp;same&nbsp;elements.</span></div></li>
<li><div class="src-line"><a name="a377"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;attr()</span></div></li>
<li><div class="src-line"><a name="a378"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a379"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodremoveAttr">removeAttr</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a380"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a381"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a382"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Given&nbsp;a&nbsp;selector,&nbsp;this&nbsp;checks&nbsp;to&nbsp;see&nbsp;if&nbsp;the&nbsp;current&nbsp;set&nbsp;has&nbsp;one&nbsp;or&nbsp;more&nbsp;matches.</span></div></li>
<li><div class="src-line"><a name="a383"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a384"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Unlike&nbsp;jQuery's&nbsp;version,&nbsp;this&nbsp;supports&nbsp;full&nbsp;selectors&nbsp;(not&nbsp;just&nbsp;simple&nbsp;ones).</span></div></li>
<li><div class="src-line"><a name="a385"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a386"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a387"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;selector&nbsp;to&nbsp;search&nbsp;for.</span></div></li>
<li><div class="src-line"><a name="a388"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span></div></li>
<li><div class="src-line"><a name="a389"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;TRUE&nbsp;if&nbsp;one&nbsp;or&nbsp;more&nbsp;elements&nbsp;match.&nbsp;FALSE&nbsp;if&nbsp;no&nbsp;match&nbsp;is&nbsp;found.</span></div></li>
<li><div class="src-line"><a name="a390"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;get()</span></div></li>
<li><div class="src-line"><a name="a391"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;eq()</span></div></li>
<li><div class="src-line"><a name="a392"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a393"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodis">is</a><span class="src-sym">(</span><span class="src-var">$selector</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a394"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a395"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a396"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Filter&nbsp;a&nbsp;list&nbsp;down&nbsp;to&nbsp;only&nbsp;elements&nbsp;that&nbsp;match&nbsp;the&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a397"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Use&nbsp;this,&nbsp;for&nbsp;example,&nbsp;to&nbsp;find&nbsp;all&nbsp;elements&nbsp;with&nbsp;a&nbsp;class,&nbsp;or&nbsp;with</span></div></li>
<li><div class="src-line"><a name="a398"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;certain&nbsp;children.</span></div></li>
<li><div class="src-line"><a name="a399"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a400"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a401"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;selector&nbsp;to&nbsp;use&nbsp;as&nbsp;a&nbsp;filter.</span></div></li>
<li><div class="src-line"><a name="a402"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a403"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;with&nbsp;non-matching&nbsp;items&nbsp;filtered&nbsp;out.</span></div></li>
<li><div class="src-line"><a name="a404"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;filterLambda()</span></div></li>
<li><div class="src-line"><a name="a405"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;filterCallback()</span></div></li>
<li><div class="src-line"><a name="a406"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;map()</span></div></li>
<li><div class="src-line"><a name="a407"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;find()</span></div></li>
<li><div class="src-line"><a name="a408"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;is()</span></div></li>
<li><div class="src-line"><a name="a409"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a410"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodfilter">filter</a><span class="src-sym">(</span><span class="src-var">$selector</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a411"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a412"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a413"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Filter&nbsp;based&nbsp;on&nbsp;a&nbsp;lambda&nbsp;function.</span></div></li>
<li><div class="src-line"><a name="a414"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a415"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;function&nbsp;string&nbsp;will&nbsp;be&nbsp;executed&nbsp;as&nbsp;if&nbsp;it&nbsp;were&nbsp;the&nbsp;body&nbsp;of&nbsp;a</span></div></li>
<li><div class="src-line"><a name="a416"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;function.&nbsp;It&nbsp;is&nbsp;passed&nbsp;two&nbsp;arguments:</span></div></li>
<li><div class="src-line"><a name="a417"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;$index:&nbsp;The&nbsp;index&nbsp;of&nbsp;the&nbsp;item.</span></div></li>
<li><div class="src-line"><a name="a418"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;$item:&nbsp;The&nbsp;current&nbsp;Element.</span></div></li>
<li><div class="src-line"><a name="a419"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;If&nbsp;the&nbsp;function&nbsp;returns&nbsp;boolean&nbsp;FALSE,&nbsp;the&nbsp;item&nbsp;will&nbsp;be&nbsp;removed&nbsp;from</span></div></li>
<li><div class="src-line"><a name="a420"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;list&nbsp;of&nbsp;elements.&nbsp;Otherwise&nbsp;it&nbsp;will&nbsp;be&nbsp;kept.</span></div></li>
<li><div class="src-line"><a name="a421"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a422"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:</span></div></li>
<li><div class="src-line"><a name="a423"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a424"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;qp('li')-&gt;filterLambda('qp($item)-&gt;attr(&quot;id&quot;)&nbsp;==&nbsp;&quot;test&quot;');</span></div></li>
<li><div class="src-line"><a name="a425"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a426"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a427"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;above&nbsp;would&nbsp;filter&nbsp;down&nbsp;the&nbsp;list&nbsp;to&nbsp;only&nbsp;an&nbsp;item&nbsp;whose&nbsp;ID&nbsp;is</span></div></li>
<li><div class="src-line"><a name="a428"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;'text'.</span></div></li>
<li><div class="src-line"><a name="a429"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a430"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$function&nbsp;</span></div></li>
<li><div class="src-line"><a name="a431"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Inline&nbsp;lambda&nbsp;function&nbsp;in&nbsp;a&nbsp;string.</span></div></li>
<li><div class="src-line"><a name="a432"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a433"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;filter()</span></div></li>
<li><div class="src-line"><a name="a434"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;map()</span></div></li>
<li><div class="src-line"><a name="a435"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;mapLambda()</span></div></li>
<li><div class="src-line"><a name="a436"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;filterCallback()</span></div></li>
<li><div class="src-line"><a name="a437"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a438"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodfilterLambda">filterLambda</a><span class="src-sym">(</span><span class="src-var">$function</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a439"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a440"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a441"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Filter&nbsp;based&nbsp;on&nbsp;a&nbsp;callback&nbsp;function.</span></div></li>
<li><div class="src-line"><a name="a442"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a443"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;A&nbsp;callback&nbsp;may&nbsp;be&nbsp;any&nbsp;of&nbsp;the&nbsp;following:</span></div></li>
<li><div class="src-line"><a name="a444"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;-&nbsp;a&nbsp;function:&nbsp;'my_func'.</span></div></li>
<li><div class="src-line"><a name="a445"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;-&nbsp;an&nbsp;object/method&nbsp;combo:&nbsp;$obj,&nbsp;'myMethod'</span></div></li>
<li><div class="src-line"><a name="a446"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;-&nbsp;a&nbsp;class/method&nbsp;combo:&nbsp;'MyClass',&nbsp;'myMethod'</span></div></li>
<li><div class="src-line"><a name="a447"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Note&nbsp;that&nbsp;classes&nbsp;are&nbsp;passed&nbsp;in&nbsp;strings.&nbsp;Objects&nbsp;are&nbsp;not.</span></div></li>
<li><div class="src-line"><a name="a448"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a449"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Each&nbsp;callback&nbsp;is&nbsp;passed&nbsp;to&nbsp;arguments:</span></div></li>
<li><div class="src-line"><a name="a450"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;-&nbsp;$index:&nbsp;The&nbsp;index&nbsp;position&nbsp;of&nbsp;the&nbsp;object&nbsp;in&nbsp;the&nbsp;array.</span></div></li>
<li><div class="src-line"><a name="a451"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;-&nbsp;$item:&nbsp;The&nbsp;item&nbsp;to&nbsp;be&nbsp;operated&nbsp;upon.</span></div></li>
<li><div class="src-line"><a name="a452"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a453"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$callback.&nbsp;</span></div></li>
<li><div class="src-line"><a name="a454"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-doc">A&nbsp;callback&nbsp;either&nbsp;as&nbsp;a&nbsp;string&nbsp;(function)&nbsp;or&nbsp;an&nbsp;array&nbsp;(object,&nbsp;method&nbsp;OR</span></div></li>
<li><div class="src-line"><a name="a455"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;classname,&nbsp;method).</span></div></li>
<li><div class="src-line"><a name="a456"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a457"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;Query&nbsp;path&nbsp;object&nbsp;augmented&nbsp;according&nbsp;to&nbsp;the&nbsp;function.</span></div></li>
<li><div class="src-line"><a name="a458"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;filter()</span></div></li>
<li><div class="src-line"><a name="a459"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;filterLambda()</span></div></li>
<li><div class="src-line"><a name="a460"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;map()</span></div></li>
<li><div class="src-line"><a name="a461"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;is()</span></div></li>
<li><div class="src-line"><a name="a462"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;find()</span></div></li>
<li><div class="src-line"><a name="a463"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a464"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodfilterCallback">filterCallback</a><span class="src-sym">(</span><span class="src-var">$callback</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a465"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a466"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a467"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Filter&nbsp;a&nbsp;list&nbsp;to&nbsp;contain&nbsp;only&nbsp;items&nbsp;that&nbsp;do&nbsp;NOT&nbsp;match.</span></div></li>
<li><div class="src-line"><a name="a468"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a469"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a470"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;selector&nbsp;to&nbsp;use&nbsp;as&nbsp;a&nbsp;negation&nbsp;filter.&nbsp;If&nbsp;the&nbsp;filter&nbsp;is&nbsp;matched,&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a471"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;element&nbsp;will&nbsp;be&nbsp;removed&nbsp;from&nbsp;the&nbsp;list.</span></div></li>
<li><div class="src-line"><a name="a472"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a473"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object&nbsp;with&nbsp;matching&nbsp;items&nbsp;filtered&nbsp;out.</span></div></li>
<li><div class="src-line"><a name="a474"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;find()</span></div></li>
<li><div class="src-line"><a name="a475"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a476"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodnot">not</a><span class="src-sym">(</span><span class="src-var">$selector</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a477"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a478"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a479"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;an&nbsp;item's&nbsp;index.</span></div></li>
<li><div class="src-line"><a name="a480"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a481"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Given&nbsp;a&nbsp;DOMElement,&nbsp;get&nbsp;the&nbsp;index&nbsp;from&nbsp;the&nbsp;matches.&nbsp;This&nbsp;is&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a482"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;converse&nbsp;of&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;get()}</span><span class="src-doc">.</span></div></li>
<li><div class="src-line"><a name="a483"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a484"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">DOMElement&nbsp;</span><span class="src-doc-var">$subject&nbsp;</span></div></li>
<li><div class="src-line"><a name="a485"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;item&nbsp;to&nbsp;match.</span></div></li>
<li><div class="src-line"><a name="a486"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a487"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span></div></li>
<li><div class="src-line"><a name="a488"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;index&nbsp;as&nbsp;an&nbsp;integer&nbsp;(if&nbsp;found),&nbsp;or&nbsp;boolean&nbsp;FALSE.&nbsp;Since&nbsp;0&nbsp;is&nbsp;a</span></div></li>
<li><div class="src-line"><a name="a489"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;valid&nbsp;index,&nbsp;you&nbsp;should&nbsp;use&nbsp;strong&nbsp;equality&nbsp;(===)&nbsp;to&nbsp;test..</span></div></li>
<li><div class="src-line"><a name="a490"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;get()</span></div></li>
<li><div class="src-line"><a name="a491"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;is()</span></div></li>
<li><div class="src-line"><a name="a492"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a493"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodindex">index</a><span class="src-sym">(</span><span class="src-var">$subject</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a494"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a495"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a496"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Run&nbsp;a&nbsp;function&nbsp;on&nbsp;each&nbsp;item&nbsp;in&nbsp;a&nbsp;set.</span></div></li>
<li><div class="src-line"><a name="a497"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a498"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;mapping&nbsp;callback&nbsp;can&nbsp;return&nbsp;anything.&nbsp;Whatever&nbsp;it&nbsp;returns&nbsp;will&nbsp;be</span></div></li>
<li><div class="src-line"><a name="a499"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;stored&nbsp;as&nbsp;a&nbsp;match&nbsp;in&nbsp;the&nbsp;set,&nbsp;though.&nbsp;This&nbsp;means&nbsp;that&nbsp;afer&nbsp;a&nbsp;map&nbsp;call,</span></div></li>
<li><div class="src-line"><a name="a500"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;there&nbsp;is&nbsp;no&nbsp;guarantee&nbsp;that&nbsp;the&nbsp;elements&nbsp;in&nbsp;the&nbsp;set&nbsp;will&nbsp;behave&nbsp;correctly</span></div></li>
<li><div class="src-line"><a name="a501"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;with&nbsp;other&nbsp;QueryPath&nbsp;functions.</span></div></li>
<li><div class="src-line"><a name="a502"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a503"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Callback&nbsp;rules:</span></div></li>
<li><div class="src-line"><a name="a504"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;If&nbsp;the&nbsp;callback&nbsp;returns&nbsp;NULL,&nbsp;the&nbsp;item&nbsp;will&nbsp;be&nbsp;removed&nbsp;from&nbsp;the&nbsp;array.</span></div></li>
<li><div class="src-line"><a name="a505"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;If&nbsp;the&nbsp;callback&nbsp;returns&nbsp;an&nbsp;array,&nbsp;the&nbsp;entire&nbsp;array&nbsp;will&nbsp;be&nbsp;stored&nbsp;in</span></div></li>
<li><div class="src-line"><a name="a506"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;the&nbsp;results.</span></div></li>
<li><div class="src-line"><a name="a507"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;If&nbsp;the&nbsp;callback&nbsp;returns&nbsp;anything&nbsp;else,&nbsp;it&nbsp;will&nbsp;be&nbsp;appended&nbsp;to&nbsp;the&nbsp;array</span></div></li>
<li><div class="src-line"><a name="a508"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;of&nbsp;matches.</span></div></li>
<li><div class="src-line"><a name="a509"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a510"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">callback&nbsp;</span><span class="src-doc-var">$callback&nbsp;</span></div></li>
<li><div class="src-line"><a name="a511"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;function&nbsp;or&nbsp;callback&nbsp;to&nbsp;use.&nbsp;The&nbsp;callback&nbsp;will&nbsp;be&nbsp;passed&nbsp;two&nbsp;params:</span></div></li>
<li><div class="src-line"><a name="a512"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;-&nbsp;$index:&nbsp;The&nbsp;index&nbsp;position&nbsp;in&nbsp;the&nbsp;list&nbsp;of&nbsp;items&nbsp;wrapped&nbsp;by&nbsp;this&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a513"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;-&nbsp;$item:&nbsp;The&nbsp;current&nbsp;item.</span></div></li>
<li><div class="src-line"><a name="a514"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a515"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a516"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object&nbsp;wrapping&nbsp;a&nbsp;list&nbsp;of&nbsp;whatever&nbsp;values&nbsp;were&nbsp;returned</span></div></li>
<li><div class="src-line"><a name="a517"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;by&nbsp;each&nbsp;run&nbsp;of&nbsp;the&nbsp;callback.</span></div></li>
<li><div class="src-line"><a name="a518"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a519"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;QueryPath::get()</span></div></li>
<li><div class="src-line"><a name="a520"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;filter()</span></div></li>
<li><div class="src-line"><a name="a521"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;find()</span></div></li>
<li><div class="src-line"><a name="a522"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a523"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodmap">map</a><span class="src-sym">(</span><span class="src-var">$callback</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a524"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a525"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a526"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Narrow&nbsp;the&nbsp;items&nbsp;in&nbsp;this&nbsp;object&nbsp;down&nbsp;to&nbsp;only&nbsp;a&nbsp;slice&nbsp;of&nbsp;the&nbsp;starting&nbsp;items.</span></div></li>
<li><div class="src-line"><a name="a527"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a528"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$start&nbsp;</span></div></li>
<li><div class="src-line"><a name="a529"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Where&nbsp;in&nbsp;the&nbsp;list&nbsp;of&nbsp;matches&nbsp;to&nbsp;begin&nbsp;the&nbsp;slice.</span></div></li>
<li><div class="src-line"><a name="a530"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$count&nbsp;</span></div></li>
<li><div class="src-line"><a name="a531"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;number&nbsp;of&nbsp;items&nbsp;to&nbsp;include&nbsp;in&nbsp;the&nbsp;slice.&nbsp;If&nbsp;nothing&nbsp;is&nbsp;specified,&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a532"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;all&nbsp;remaining&nbsp;matches&nbsp;(from&nbsp;$start&nbsp;onward)&nbsp;will&nbsp;be&nbsp;included&nbsp;in&nbsp;the&nbsp;sliced</span></div></li>
<li><div class="src-line"><a name="a533"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;list.</span></div></li>
<li><div class="src-line"><a name="a534"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a535"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;array_slice()</span></div></li>
<li><div class="src-line"><a name="a536"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a537"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodslice">slice</a><span class="src-sym">(</span><span class="src-var">$start</span><span class="src-sym">,&nbsp;</span><span class="src-var">$end&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a538"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a539"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a540"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Run&nbsp;a&nbsp;callback&nbsp;on&nbsp;each&nbsp;item&nbsp;in&nbsp;the&nbsp;list&nbsp;of&nbsp;items.</span></div></li>
<li><div class="src-line"><a name="a541"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a542"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Rules&nbsp;of&nbsp;the&nbsp;callback:</span></div></li>
<li><div class="src-line"><a name="a543"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;A&nbsp;callback&nbsp;is&nbsp;passed&nbsp;two&nbsp;variables:&nbsp;$index&nbsp;and&nbsp;$item.&nbsp;(There&nbsp;is&nbsp;no</span></div></li>
<li><div class="src-line"><a name="a544"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;special&nbsp;treatment&nbsp;of&nbsp;$this,&nbsp;as&nbsp;there&nbsp;is&nbsp;in&nbsp;jQuery.)</span></div></li>
<li><div class="src-line"><a name="a545"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;-&nbsp;You&nbsp;will&nbsp;want&nbsp;to&nbsp;pass&nbsp;$item&nbsp;by&nbsp;reference&nbsp;if&nbsp;it&nbsp;is&nbsp;not&nbsp;an</span></div></li>
<li><div class="src-line"><a name="a546"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;object&nbsp;(DOMNodes&nbsp;are&nbsp;all&nbsp;objects).</span></div></li>
<li><div class="src-line"><a name="a547"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;A&nbsp;callback&nbsp;that&nbsp;returns&nbsp;FALSE&nbsp;will&nbsp;stop&nbsp;execution&nbsp;of&nbsp;the&nbsp;each()&nbsp;loop.&nbsp;This</span></div></li>
<li><div class="src-line"><a name="a548"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;works&nbsp;like&nbsp;break&nbsp;in&nbsp;a&nbsp;standard&nbsp;loop.</span></div></li>
<li><div class="src-line"><a name="a549"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;A&nbsp;TRUE&nbsp;return&nbsp;value&nbsp;from&nbsp;the&nbsp;callback&nbsp;is&nbsp;analogous&nbsp;to&nbsp;a&nbsp;continue&nbsp;statement.</span></div></li>
<li><div class="src-line"><a name="a550"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;All&nbsp;other&nbsp;return&nbsp;values&nbsp;are&nbsp;ignored.</span></div></li>
<li><div class="src-line"><a name="a551"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a552"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">callback&nbsp;</span><span class="src-doc-var">$callback&nbsp;</span></div></li>
<li><div class="src-line"><a name="a553"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;callback&nbsp;to&nbsp;run.</span></div></li>
<li><div class="src-line"><a name="a554"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a555"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a556"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;eachLambda()</span></div></li>
<li><div class="src-line"><a name="a557"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;filter()</span></div></li>
<li><div class="src-line"><a name="a558"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;map()</span></div></li>
<li><div class="src-line"><a name="a559"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a560"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodeach">each</a><span class="src-sym">(</span><span class="src-var">$callback</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a561"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a562"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a563"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;An&nbsp;each()&nbsp;iterator&nbsp;that&nbsp;takes&nbsp;a&nbsp;lambda&nbsp;function.</span></div></li>
<li><div class="src-line"><a name="a564"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a565"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$lambda&nbsp;</span></div></li>
<li><div class="src-line"><a name="a566"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;lambda&nbsp;function.&nbsp;This&nbsp;will&nbsp;be&nbsp;passed&nbsp;($index,&nbsp;&amp;$item).</span></div></li>
<li><div class="src-line"><a name="a567"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a568"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a569"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;each()</span></div></li>
<li><div class="src-line"><a name="a570"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;filterLambda()</span></div></li>
<li><div class="src-line"><a name="a571"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;filterCallback()</span></div></li>
<li><div class="src-line"><a name="a572"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;map()</span></div></li>
<li><div class="src-line"><a name="a573"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a574"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodeachLambda">eachLambda</a><span class="src-sym">(</span><span class="src-var">$lambda</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a575"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a576"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a577"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Insert&nbsp;the&nbsp;given&nbsp;markup&nbsp;as&nbsp;the&nbsp;last&nbsp;child.</span></div></li>
<li><div class="src-line"><a name="a578"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a579"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;markup&nbsp;will&nbsp;be&nbsp;inserted&nbsp;into&nbsp;each&nbsp;match&nbsp;in&nbsp;the&nbsp;set.</span></div></li>
<li><div class="src-line"><a name="a580"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a581"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;same&nbsp;element&nbsp;cannot&nbsp;be&nbsp;inserted&nbsp;multiple&nbsp;times&nbsp;into&nbsp;a&nbsp;document.&nbsp;DOM</span></div></li>
<li><div class="src-line"><a name="a582"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;documents&nbsp;do&nbsp;not&nbsp;allow&nbsp;a&nbsp;single&nbsp;object&nbsp;to&nbsp;be&nbsp;inserted&nbsp;multiple&nbsp;times</span></div></li>
<li><div class="src-line"><a name="a583"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;into&nbsp;the&nbsp;DOM.&nbsp;To&nbsp;insert&nbsp;the&nbsp;same&nbsp;XML&nbsp;repeatedly,&nbsp;we&nbsp;must&nbsp;first&nbsp;clone</span></div></li>
<li><div class="src-line"><a name="a584"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;object.&nbsp;This&nbsp;has&nbsp;one&nbsp;practical&nbsp;implication:&nbsp;Once&nbsp;you&nbsp;have&nbsp;inserted</span></div></li>
<li><div class="src-line"><a name="a585"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;an&nbsp;element&nbsp;into&nbsp;the&nbsp;object,&nbsp;you&nbsp;cannot&nbsp;further&nbsp;manipulate&nbsp;the&nbsp;original</span></div></li>
<li><div class="src-line"><a name="a586"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;element&nbsp;and&nbsp;expect&nbsp;the&nbsp;changes&nbsp;to&nbsp;be&nbsp;replciated&nbsp;in&nbsp;the&nbsp;appended&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a587"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;(They&nbsp;are&nbsp;not&nbsp;the&nbsp;same&nbsp;--&nbsp;there&nbsp;is&nbsp;no&nbsp;shared&nbsp;reference.)&nbsp;Instead,&nbsp;you</span></div></li>
<li><div class="src-line"><a name="a588"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;will&nbsp;need&nbsp;to&nbsp;retrieve&nbsp;the&nbsp;appended&nbsp;object&nbsp;and&nbsp;operate&nbsp;on&nbsp;that.</span></div></li>
<li><div class="src-line"><a name="a589"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a590"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span><span class="src-doc-var">$data&nbsp;</span></div></li>
<li><div class="src-line"><a name="a591"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;This&nbsp;can&nbsp;be&nbsp;either&nbsp;a&nbsp;string&nbsp;(the&nbsp;usual&nbsp;case),&nbsp;or&nbsp;a&nbsp;DOM&nbsp;Element.</span></div></li>
<li><div class="src-line"><a name="a592"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a593"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a594"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;appendTo()</span></div></li>
<li><div class="src-line"><a name="a595"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;prepend()</span></div></li>
<li><div class="src-line"><a name="a596"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a597"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodappend">append</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a598"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a599"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a600"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Append&nbsp;the&nbsp;current&nbsp;elements&nbsp;to&nbsp;the&nbsp;destination&nbsp;passed&nbsp;into&nbsp;the&nbsp;function.</span></div></li>
<li><div class="src-line"><a name="a601"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a602"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;cycles&nbsp;through&nbsp;all&nbsp;of&nbsp;the&nbsp;current&nbsp;matches&nbsp;and&nbsp;appends&nbsp;them&nbsp;to</span></div></li>
<li><div class="src-line"><a name="a603"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;context&nbsp;given&nbsp;in&nbsp;$destination.&nbsp;If&nbsp;a&nbsp;selector&nbsp;is&nbsp;provided&nbsp;then&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a604"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;$destination&nbsp;is&nbsp;queried&nbsp;(using&nbsp;that&nbsp;selector)&nbsp;prior&nbsp;to&nbsp;the&nbsp;data&nbsp;being</span></div></li>
<li><div class="src-line"><a name="a605"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;appended.&nbsp;The&nbsp;data&nbsp;is&nbsp;then&nbsp;appended&nbsp;to&nbsp;the&nbsp;found&nbsp;items.</span></div></li>
<li><div class="src-line"><a name="a606"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a607"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span><span class="src-doc-var">$destination&nbsp;</span></div></li>
<li><div class="src-line"><a name="a608"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;QueryPath&nbsp;object&nbsp;that&nbsp;will&nbsp;be&nbsp;appended&nbsp;to.</span></div></li>
<li><div class="src-line"><a name="a609"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a610"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;original&nbsp;QueryPath,&nbsp;unaltered.&nbsp;Only&nbsp;the&nbsp;destination&nbsp;QueryPath&nbsp;will</span></div></li>
<li><div class="src-line"><a name="a611"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;be&nbsp;modified.</span></div></li>
<li><div class="src-line"><a name="a612"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;append()</span></div></li>
<li><div class="src-line"><a name="a613"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;prependTo()</span></div></li>
<li><div class="src-line"><a name="a614"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a615"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodappendTo">appendTo</a><span class="src-sym">(</span><span class="src-id">QueryPath&nbsp;</span><span class="src-var">$destination</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a616"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a617"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a618"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Insert&nbsp;the&nbsp;contents&nbsp;of&nbsp;the&nbsp;current&nbsp;QueryPath&nbsp;after&nbsp;the&nbsp;nodes&nbsp;in&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a619"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;destination&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a620"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a621"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span><span class="src-doc-var">$dest&nbsp;</span></div></li>
<li><div class="src-line"><a name="a622"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Destination&nbsp;object&nbsp;where&nbsp;the&nbsp;current&nbsp;elements&nbsp;will&nbsp;be&nbsp;deposited.</span></div></li>
<li><div class="src-line"><a name="a623"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a624"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;present&nbsp;QueryPath,&nbsp;unaltered.&nbsp;Only&nbsp;the&nbsp;destination&nbsp;object&nbsp;is&nbsp;altered.</span></div></li>
<li><div class="src-line"><a name="a625"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;after()</span></div></li>
<li><div class="src-line"><a name="a626"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;insertBefore()</span></div></li>
<li><div class="src-line"><a name="a627"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;append()</span></div></li>
<li><div class="src-line"><a name="a628"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a629"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodinsertAfter">insertAfter</a><span class="src-sym">(</span><span class="src-id">QueryPath&nbsp;</span><span class="src-var">$dest</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a630"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a631"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a632"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Insert&nbsp;the&nbsp;given&nbsp;data&nbsp;after&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;current&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a633"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a634"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;inserts&nbsp;the&nbsp;element&nbsp;as&nbsp;a&nbsp;peer&nbsp;to&nbsp;the&nbsp;currently&nbsp;matched&nbsp;elements.</span></div></li>
<li><div class="src-line"><a name="a635"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Contrast&nbsp;this&nbsp;with&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;append()}</span><span class="src-doc">,&nbsp;which&nbsp;inserts&nbsp;the&nbsp;data&nbsp;as&nbsp;children</span></div></li>
<li><div class="src-line"><a name="a636"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;of&nbsp;matched&nbsp;elements.</span></div></li>
<li><div class="src-line"><a name="a637"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a638"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span><span class="src-doc-var">$data&nbsp;</span></div></li>
<li><div class="src-line"><a name="a639"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;data&nbsp;to&nbsp;be&nbsp;appended.</span></div></li>
<li><div class="src-line"><a name="a640"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a641"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object&nbsp;(with&nbsp;the&nbsp;items&nbsp;inserted).</span></div></li>
<li><div class="src-line"><a name="a642"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;before()</span></div></li>
<li><div class="src-line"><a name="a643"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;append()</span></div></li>
<li><div class="src-line"><a name="a644"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a645"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodafter">after</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a646"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a647"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Insert&nbsp;the&nbsp;current&nbsp;elements&nbsp;into&nbsp;the&nbsp;destination&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a648"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;items&nbsp;are&nbsp;inserted&nbsp;before&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;given&nbsp;QueryPath&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a649"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;That&nbsp;is,&nbsp;they&nbsp;will&nbsp;be&nbsp;siblings&nbsp;with&nbsp;the&nbsp;current&nbsp;elements.</span></div></li>
<li><div class="src-line"><a name="a650"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a651"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span><span class="src-doc-var">$dest&nbsp;</span></div></li>
<li><div class="src-line"><a name="a652"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Destination&nbsp;QueryPath&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a653"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a654"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;current&nbsp;QueryPath&nbsp;object,&nbsp;unaltered.&nbsp;Only&nbsp;the&nbsp;destination&nbsp;QueryPath</span></div></li>
<li><div class="src-line"><a name="a655"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;object&nbsp;is&nbsp;altered.</span></div></li>
<li><div class="src-line"><a name="a656"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;before()</span></div></li>
<li><div class="src-line"><a name="a657"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;insertAfter()</span></div></li>
<li><div class="src-line"><a name="a658"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;appendTo()</span></div></li>
<li><div class="src-line"><a name="a659"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a660"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodinsertBefore">insertBefore</a><span class="src-sym">(</span><span class="src-id">QueryPath&nbsp;</span><span class="src-var">$dest</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a661"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a662"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Insert&nbsp;the&nbsp;given&nbsp;data&nbsp;before&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;current&nbsp;set&nbsp;of&nbsp;matches.</span></div></li>
<li><div class="src-line"><a name="a663"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a664"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span><span class="src-doc-var">$data&nbsp;</span></div></li>
<li><div class="src-line"><a name="a665"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;data&nbsp;to&nbsp;be&nbsp;inserted.&nbsp;This&nbsp;can&nbsp;be&nbsp;XML&nbsp;in&nbsp;a&nbsp;string,&nbsp;a&nbsp;DomFragment,&nbsp;a&nbsp;DOMElement,</span></div></li>
<li><div class="src-line"><a name="a666"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;or&nbsp;the&nbsp;other&nbsp;usual&nbsp;suspects.&nbsp;(See&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;qp()}</span><span class="src-doc">).</span></div></li>
<li><div class="src-line"><a name="a667"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a668"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Returns&nbsp;the&nbsp;QueryPath&nbsp;with&nbsp;the&nbsp;new&nbsp;modifications.&nbsp;The&nbsp;list&nbsp;of&nbsp;elements&nbsp;currently</span></div></li>
<li><div class="src-line"><a name="a669"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;selected&nbsp;will&nbsp;remain&nbsp;the&nbsp;same.</span></div></li>
<li><div class="src-line"><a name="a670"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;insertBefore()</span></div></li>
<li><div class="src-line"><a name="a671"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;after()</span></div></li>
<li><div class="src-line"><a name="a672"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;append()</span></div></li>
<li><div class="src-line"><a name="a673"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;prepend()</span></div></li>
<li><div class="src-line"><a name="a674"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a675"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodbefore">before</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a676"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a677"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a678"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Insert&nbsp;the&nbsp;given&nbsp;markup&nbsp;as&nbsp;the&nbsp;first&nbsp;child.</span></div></li>
<li><div class="src-line"><a name="a679"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a680"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;markup&nbsp;will&nbsp;be&nbsp;inserted&nbsp;into&nbsp;each&nbsp;match&nbsp;in&nbsp;the&nbsp;set.</span></div></li>
<li><div class="src-line"><a name="a681"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a682"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span><span class="src-doc-var">$prependage&nbsp;</span></div></li>
<li><div class="src-line"><a name="a683"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;This&nbsp;can&nbsp;be&nbsp;either&nbsp;a&nbsp;string&nbsp;(the&nbsp;usual&nbsp;case),&nbsp;or&nbsp;a&nbsp;DOM&nbsp;Element.</span></div></li>
<li><div class="src-line"><a name="a684"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a685"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;append()</span></div></li>
<li><div class="src-line"><a name="a686"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;before()</span></div></li>
<li><div class="src-line"><a name="a687"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;after()</span></div></li>
<li><div class="src-line"><a name="a688"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;prependTo()</span></div></li>
<li><div class="src-line"><a name="a689"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a690"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodprepend">prepend</a><span class="src-sym">(</span><span class="src-var">$prependage</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a691"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a692"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a693"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Take&nbsp;all&nbsp;nodes&nbsp;in&nbsp;the&nbsp;current&nbsp;object&nbsp;and&nbsp;prepend&nbsp;them&nbsp;to&nbsp;the&nbsp;children&nbsp;nodes&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a694"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;each&nbsp;matched&nbsp;node&nbsp;in&nbsp;the&nbsp;passed-in&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a695"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a696"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;will&nbsp;iterate&nbsp;through&nbsp;each&nbsp;item&nbsp;in&nbsp;the&nbsp;current&nbsp;QueryPath&nbsp;object&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a697"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;add&nbsp;each&nbsp;item&nbsp;to&nbsp;the&nbsp;beginning&nbsp;of&nbsp;the&nbsp;children&nbsp;of&nbsp;each&nbsp;element&nbsp;in&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a698"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;passed-in&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a699"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a700"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;insertBefore()</span></div></li>
<li><div class="src-line"><a name="a701"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;insertAfter()</span></div></li>
<li><div class="src-line"><a name="a702"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;prepend()</span></div></li>
<li><div class="src-line"><a name="a703"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;appendTo()</span></div></li>
<li><div class="src-line"><a name="a704"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span><span class="src-doc-var">$dest&nbsp;</span></div></li>
<li><div class="src-line"><a name="a705"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;destination&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a706"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a707"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;original&nbsp;QueryPath,&nbsp;unmodified.&nbsp;NOT&nbsp;the&nbsp;destination&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a708"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a709"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodprependTo">prependTo</a><span class="src-sym">(</span><span class="src-id">QueryPath&nbsp;</span><span class="src-var">$dest</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a710"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a711"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a712"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Reduce&nbsp;the&nbsp;set&nbsp;of&nbsp;matches&nbsp;to&nbsp;the&nbsp;deepest&nbsp;child&nbsp;node&nbsp;in&nbsp;the&nbsp;tree.</span></div></li>
<li><div class="src-line"><a name="a713"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a714"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;loops&nbsp;through&nbsp;the&nbsp;matches&nbsp;and&nbsp;looks&nbsp;for&nbsp;the&nbsp;deepest&nbsp;child&nbsp;node&nbsp;of&nbsp;all&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a715"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;matches.&nbsp;&quot;Deepest&quot;,&nbsp;here,&nbsp;is&nbsp;relative&nbsp;to&nbsp;the&nbsp;nodes&nbsp;in&nbsp;the&nbsp;list.&nbsp;It&nbsp;is</span></div></li>
<li><div class="src-line"><a name="a716"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;calculated&nbsp;as&nbsp;the&nbsp;distance&nbsp;from&nbsp;the&nbsp;starting&nbsp;node&nbsp;to&nbsp;the&nbsp;most&nbsp;distant&nbsp;child</span></div></li>
<li><div class="src-line"><a name="a717"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;node.&nbsp;In&nbsp;other&nbsp;words,&nbsp;it&nbsp;is&nbsp;not&nbsp;necessarily&nbsp;the&nbsp;farthest&nbsp;node&nbsp;from&nbsp;the&nbsp;root</span></div></li>
<li><div class="src-line"><a name="a718"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;element,&nbsp;but&nbsp;the&nbsp;farthest&nbsp;note&nbsp;from&nbsp;the&nbsp;matched&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a719"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a720"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;In&nbsp;the&nbsp;case&nbsp;where&nbsp;there&nbsp;are&nbsp;multiple&nbsp;nodes&nbsp;at&nbsp;the&nbsp;same&nbsp;depth,&nbsp;all&nbsp;of&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a721"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;nodes&nbsp;at&nbsp;that&nbsp;depth&nbsp;will&nbsp;be&nbsp;included.</span></div></li>
<li><div class="src-line"><a name="a722"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a723"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a724"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;wrapping&nbsp;the&nbsp;single&nbsp;deepest&nbsp;node.</span></div></li>
<li><div class="src-line"><a name="a725"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a726"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methoddeepest">deepest</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a727"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a728"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a729"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Wrap&nbsp;each&nbsp;element&nbsp;inside&nbsp;of&nbsp;the&nbsp;given&nbsp;markup.</span></div></li>
<li><div class="src-line"><a name="a730"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a731"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Markup&nbsp;is&nbsp;usually&nbsp;a&nbsp;string,&nbsp;but&nbsp;it&nbsp;can&nbsp;also&nbsp;be&nbsp;a&nbsp;DOMNode,&nbsp;a&nbsp;document</span></div></li>
<li><div class="src-line"><a name="a732"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;fragment,&nbsp;a&nbsp;SimpleXMLElement,&nbsp;or&nbsp;another&nbsp;QueryPath&nbsp;object&nbsp;(in&nbsp;which&nbsp;case</span></div></li>
<li><div class="src-line"><a name="a733"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;first&nbsp;item&nbsp;in&nbsp;the&nbsp;list&nbsp;will&nbsp;be&nbsp;used.)</span></div></li>
<li><div class="src-line"><a name="a734"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a735"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span><span class="src-doc-var">$markup&nbsp;</span></div></li>
<li><div class="src-line"><a name="a736"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Markup&nbsp;that&nbsp;will&nbsp;wrap&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;current&nbsp;list.</span></div></li>
<li><div class="src-line"><a name="a737"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a738"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object&nbsp;with&nbsp;the&nbsp;wrapping&nbsp;changes&nbsp;made.</span></div></li>
<li><div class="src-line"><a name="a739"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;wrapAll()</span></div></li>
<li><div class="src-line"><a name="a740"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;wrapInner()</span></div></li>
<li><div class="src-line"><a name="a741"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a742"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodwrap">wrap</a><span class="src-sym">(</span><span class="src-var">$markup</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a743"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a744"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Wrap&nbsp;all&nbsp;elements&nbsp;inside&nbsp;of&nbsp;the&nbsp;given&nbsp;markup.</span></div></li>
<li><div class="src-line"><a name="a745"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a746"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;So&nbsp;all&nbsp;elements&nbsp;will&nbsp;be&nbsp;grouped&nbsp;together&nbsp;under&nbsp;this&nbsp;single&nbsp;marked&nbsp;up</span></div></li>
<li><div class="src-line"><a name="a747"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;item.&nbsp;This&nbsp;works&nbsp;by&nbsp;first&nbsp;determining&nbsp;the&nbsp;parent&nbsp;element&nbsp;of&nbsp;the&nbsp;first&nbsp;item</span></div></li>
<li><div class="src-line"><a name="a748"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;in&nbsp;the&nbsp;list.&nbsp;It&nbsp;then&nbsp;moves&nbsp;all&nbsp;of&nbsp;the&nbsp;matching&nbsp;elements&nbsp;under&nbsp;the&nbsp;wrapper</span></div></li>
<li><div class="src-line"><a name="a749"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;and&nbsp;inserts&nbsp;the&nbsp;wrapper&nbsp;where&nbsp;that&nbsp;first&nbsp;element&nbsp;was&nbsp;found.&nbsp;(This&nbsp;is&nbsp;in</span></div></li>
<li><div class="src-line"><a name="a750"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;accordance&nbsp;with&nbsp;the&nbsp;way&nbsp;jQuery&nbsp;works.)</span></div></li>
<li><div class="src-line"><a name="a751"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a752"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Markup&nbsp;is&nbsp;usually&nbsp;XML&nbsp;in&nbsp;a&nbsp;string,&nbsp;but&nbsp;it&nbsp;can&nbsp;also&nbsp;be&nbsp;a&nbsp;DOMNode,&nbsp;a&nbsp;document</span></div></li>
<li><div class="src-line"><a name="a753"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;fragment,&nbsp;a&nbsp;SimpleXMLElement,&nbsp;or&nbsp;another&nbsp;QueryPath&nbsp;object&nbsp;(in&nbsp;which&nbsp;case</span></div></li>
<li><div class="src-line"><a name="a754"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;first&nbsp;item&nbsp;in&nbsp;the&nbsp;list&nbsp;will&nbsp;be&nbsp;used.)</span></div></li>
<li><div class="src-line"><a name="a755"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a756"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$markup&nbsp;</span></div></li>
<li><div class="src-line"><a name="a757"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Markup&nbsp;that&nbsp;will&nbsp;wrap&nbsp;all&nbsp;elements&nbsp;in&nbsp;the&nbsp;current&nbsp;list.</span></div></li>
<li><div class="src-line"><a name="a758"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a759"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object&nbsp;with&nbsp;the&nbsp;wrapping&nbsp;changes&nbsp;made.</span></div></li>
<li><div class="src-line"><a name="a760"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;wrap()</span></div></li>
<li><div class="src-line"><a name="a761"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;wrapInner()</span></div></li>
<li><div class="src-line"><a name="a762"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a763"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodwrapAll">wrapAll</a><span class="src-sym">(</span><span class="src-var">$markup</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a764"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a765"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Wrap&nbsp;the&nbsp;child&nbsp;elements&nbsp;of&nbsp;each&nbsp;item&nbsp;in&nbsp;the&nbsp;list&nbsp;with&nbsp;the&nbsp;given&nbsp;markup.</span></div></li>
<li><div class="src-line"><a name="a766"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a767"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Markup&nbsp;is&nbsp;usually&nbsp;a&nbsp;string,&nbsp;but&nbsp;it&nbsp;can&nbsp;also&nbsp;be&nbsp;a&nbsp;DOMNode,&nbsp;a&nbsp;document</span></div></li>
<li><div class="src-line"><a name="a768"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;fragment,&nbsp;a&nbsp;SimpleXMLElement,&nbsp;or&nbsp;another&nbsp;QueryPath&nbsp;object&nbsp;(in&nbsp;which&nbsp;case</span></div></li>
<li><div class="src-line"><a name="a769"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;first&nbsp;item&nbsp;in&nbsp;the&nbsp;list&nbsp;will&nbsp;be&nbsp;used.)</span></div></li>
<li><div class="src-line"><a name="a770"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a771"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$markup&nbsp;</span></div></li>
<li><div class="src-line"><a name="a772"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Markup&nbsp;that&nbsp;will&nbsp;wrap&nbsp;children&nbsp;of&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;current&nbsp;list.</span></div></li>
<li><div class="src-line"><a name="a773"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a774"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object&nbsp;with&nbsp;the&nbsp;wrapping&nbsp;changes&nbsp;made.</span></div></li>
<li><div class="src-line"><a name="a775"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;wrap()</span></div></li>
<li><div class="src-line"><a name="a776"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;wrapAll()</span></div></li>
<li><div class="src-line"><a name="a777"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a778"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodwrapInner">wrapInner</a><span class="src-sym">(</span><span class="src-var">$element</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a779"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a780"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a781"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;tag&nbsp;name&nbsp;of&nbsp;the&nbsp;first&nbsp;element&nbsp;in&nbsp;the&nbsp;list.</span></div></li>
<li><div class="src-line"><a name="a782"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">string&nbsp;</span></div></li>
<li><div class="src-line"><a name="a783"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;tag&nbsp;name&nbsp;of&nbsp;the&nbsp;first&nbsp;element&nbsp;in&nbsp;the&nbsp;list.</span></div></li>
<li><div class="src-line"><a name="a784"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a785"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodtag">tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a786"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a787"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a788"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Replace&nbsp;the&nbsp;existing&nbsp;element(s)&nbsp;in&nbsp;the&nbsp;list&nbsp;with&nbsp;a&nbsp;new&nbsp;one.</span></div></li>
<li><div class="src-line"><a name="a789"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a790"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span><span class="src-doc-var">$new&nbsp;</span></div></li>
<li><div class="src-line"><a name="a791"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;DOMElement&nbsp;or&nbsp;XML&nbsp;in&nbsp;a&nbsp;string.&nbsp;This&nbsp;will&nbsp;replace&nbsp;all&nbsp;elements</span></div></li>
<li><div class="src-line"><a name="a792"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;currently&nbsp;wrapped&nbsp;in&nbsp;the&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a793"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a794"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object&nbsp;wrapping&nbsp;&lt;b&gt;the&nbsp;items&nbsp;that&nbsp;were&nbsp;removed&lt;/b&gt;.</span></div></li>
<li><div class="src-line"><a name="a795"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;This&nbsp;remains&nbsp;consistent&nbsp;with&nbsp;the&nbsp;jQuery&nbsp;API.</span></div></li>
<li><div class="src-line"><a name="a796"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;append()</span></div></li>
<li><div class="src-line"><a name="a797"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;prepend()</span></div></li>
<li><div class="src-line"><a name="a798"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;before()</span></div></li>
<li><div class="src-line"><a name="a799"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;after()</span></div></li>
<li><div class="src-line"><a name="a800"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;remove()</span></div></li>
<li><div class="src-line"><a name="a801"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;replaceAll()</span></div></li>
<li><div class="src-line"><a name="a802"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a803"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodreplaceWith">replaceWith</a><span class="src-sym">(</span><span class="src-var">$new</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a804"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a805"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a806"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Remove&nbsp;any&nbsp;items&nbsp;from&nbsp;the&nbsp;list&nbsp;if&nbsp;they&nbsp;match&nbsp;the&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a807"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a808"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;In&nbsp;other&nbsp;words,&nbsp;each&nbsp;item&nbsp;that&nbsp;matches&nbsp;the&nbsp;selector&nbsp;will&nbsp;be&nbsp;remove</span></div></li>
<li><div class="src-line"><a name="a809"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;from&nbsp;the&nbsp;DOM&nbsp;document.&nbsp;The&nbsp;returned&nbsp;QueryPath&nbsp;wraps&nbsp;the&nbsp;list&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a810"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;removed&nbsp;elements.</span></div></li>
<li><div class="src-line"><a name="a811"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a812"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;If&nbsp;no&nbsp;selector&nbsp;is&nbsp;specified,&nbsp;this&nbsp;will&nbsp;remove&nbsp;all&nbsp;current&nbsp;matches&nbsp;from</span></div></li>
<li><div class="src-line"><a name="a813"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a814"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a815"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a816"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;CSS&nbsp;Selector.</span></div></li>
<li><div class="src-line"><a name="a817"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a818"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;Query&nbsp;path&nbsp;wrapping&nbsp;a&nbsp;list&nbsp;of&nbsp;removed&nbsp;items.</span></div></li>
<li><div class="src-line"><a name="a819"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;replaceAll()</span></div></li>
<li><div class="src-line"><a name="a820"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;replaceWith()</span></div></li>
<li><div class="src-line"><a name="a821"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;removeChildren()</span></div></li>
<li><div class="src-line"><a name="a822"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a823"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodremove">remove</a><span class="src-sym">(</span><span class="src-var">$selector&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a824"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a825"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a826"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;replaces&nbsp;everything&nbsp;that&nbsp;matches&nbsp;the&nbsp;selector&nbsp;with&nbsp;the&nbsp;first&nbsp;value</span></div></li>
<li><div class="src-line"><a name="a827"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;in&nbsp;the&nbsp;current&nbsp;list.</span></div></li>
<li><div class="src-line"><a name="a828"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a829"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;is&nbsp;the&nbsp;reverse&nbsp;of&nbsp;replaceWith.</span></div></li>
<li><div class="src-line"><a name="a830"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a831"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Unlike&nbsp;jQuery,&nbsp;QueryPath&nbsp;cannot&nbsp;assume&nbsp;a&nbsp;default&nbsp;document.&nbsp;Consequently,</span></div></li>
<li><div class="src-line"><a name="a832"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;you&nbsp;must&nbsp;specify&nbsp;the&nbsp;intended&nbsp;destination&nbsp;document.&nbsp;If&nbsp;it&nbsp;is&nbsp;omitted,&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a833"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;present&nbsp;document&nbsp;is&nbsp;assumed&nbsp;to&nbsp;be&nbsp;tthe&nbsp;document.&nbsp;However,&nbsp;that&nbsp;can&nbsp;result</span></div></li>
<li><div class="src-line"><a name="a834"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;in&nbsp;undefined&nbsp;behavior&nbsp;if&nbsp;the&nbsp;selector&nbsp;and&nbsp;the&nbsp;replacement&nbsp;are&nbsp;not&nbsp;sufficiently</span></div></li>
<li><div class="src-line"><a name="a835"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;distinct.</span></div></li>
<li><div class="src-line"><a name="a836"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a837"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a838"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a839"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">DOMDocument&nbsp;</span><span class="src-doc-var">$document&nbsp;</span></div></li>
<li><div class="src-line"><a name="a840"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;destination&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a841"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a842"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;wrapping&nbsp;the&nbsp;modified&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a843"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@deprecated</span><span class="src-doc">&nbsp;Due&nbsp;to&nbsp;the&nbsp;fact&nbsp;that&nbsp;this&nbsp;is&nbsp;not&nbsp;a&nbsp;particularly&nbsp;friendly&nbsp;method,</span></div></li>
<li><div class="src-line"><a name="a844"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;and&nbsp;that&nbsp;it&nbsp;can&nbsp;be&nbsp;easily&nbsp;replicated&nbsp;using&nbsp;{@see&nbsp;replaceWith()},&nbsp;it&nbsp;is&nbsp;to&nbsp;be</span></div></li>
<li><div class="src-line"><a name="a845"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;considered&nbsp;deprecated.</span></div></li>
<li><div class="src-line"><a name="a846"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;remove()</span></div></li>
<li><div class="src-line"><a name="a847"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;replaceWith()</span></div></li>
<li><div class="src-line"><a name="a848"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a849"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodreplaceAll">replaceAll</a><span class="src-sym">(</span><span class="src-var">$selector</span><span class="src-sym">,&nbsp;</span><span class="src-id">DOMDocument&nbsp;</span><span class="src-var">$document</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a850"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a851"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a852"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Add&nbsp;more&nbsp;elements&nbsp;to&nbsp;the&nbsp;current&nbsp;set&nbsp;of&nbsp;matches.</span></div></li>
<li><div class="src-line"><a name="a853"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a854"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;begins&nbsp;the&nbsp;new&nbsp;query&nbsp;at&nbsp;the&nbsp;top&nbsp;of&nbsp;the&nbsp;DOM&nbsp;again.&nbsp;The&nbsp;results&nbsp;found</span></div></li>
<li><div class="src-line"><a name="a855"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;when&nbsp;running&nbsp;this&nbsp;selector&nbsp;are&nbsp;then&nbsp;merged&nbsp;into&nbsp;the&nbsp;existing&nbsp;results.&nbsp;In</span></div></li>
<li><div class="src-line"><a name="a856"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;this&nbsp;way,&nbsp;you&nbsp;can&nbsp;add&nbsp;additional&nbsp;elements&nbsp;to&nbsp;the&nbsp;existing&nbsp;set.</span></div></li>
<li><div class="src-line"><a name="a857"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a858"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a859"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;valid&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a860"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a861"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object&nbsp;with&nbsp;the&nbsp;newly&nbsp;added&nbsp;elements.</span></div></li>
<li><div class="src-line"><a name="a862"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;append()</span></div></li>
<li><div class="src-line"><a name="a863"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;after()</span></div></li>
<li><div class="src-line"><a name="a864"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;andSelf()</span></div></li>
<li><div class="src-line"><a name="a865"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;end()</span></div></li>
<li><div class="src-line"><a name="a866"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a867"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodadd">add</a><span class="src-sym">(</span><span class="src-var">$selector</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a868"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a869"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a870"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Revert&nbsp;to&nbsp;the&nbsp;previous&nbsp;set&nbsp;of&nbsp;matches.</span></div></li>
<li><div class="src-line"><a name="a871"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a872"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;will&nbsp;revert&nbsp;back&nbsp;to&nbsp;the&nbsp;last&nbsp;set&nbsp;of&nbsp;matches&nbsp;(before&nbsp;the&nbsp;last</span></div></li>
<li><div class="src-line"><a name="a873"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&quot;destructive&quot;&nbsp;set&nbsp;of&nbsp;operations).&nbsp;This&nbsp;undoes&nbsp;any&nbsp;change&nbsp;made&nbsp;to&nbsp;the&nbsp;set&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a874"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;matched&nbsp;objects.&nbsp;Functions&nbsp;like&nbsp;{@see&nbsp;find()}&nbsp;and&nbsp;{@see&nbsp;filter()}&nbsp;change&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a875"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;list&nbsp;of&nbsp;matched&nbsp;objects.&nbsp;The&nbsp;end()&nbsp;function&nbsp;will&nbsp;revert&nbsp;back&nbsp;to&nbsp;the&nbsp;last&nbsp;set&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a876"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;matched&nbsp;items.</span></div></li>
<li><div class="src-line"><a name="a877"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a878"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Note&nbsp;that&nbsp;functions&nbsp;that&nbsp;modify&nbsp;the&nbsp;document,&nbsp;but&nbsp;do&nbsp;not&nbsp;change&nbsp;the&nbsp;list&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a879"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;matched&nbsp;objects,&nbsp;are&nbsp;not&nbsp;&quot;destructive&quot;.&nbsp;Thus,&nbsp;calling&nbsp;append('something')-&gt;end()</span></div></li>
<li><div class="src-line"><a name="a880"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;will&nbsp;not&nbsp;undo&nbsp;the&nbsp;append()&nbsp;call.</span></div></li>
<li><div class="src-line"><a name="a881"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a882"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Only&nbsp;one&nbsp;level&nbsp;of&nbsp;changes&nbsp;is&nbsp;stored.&nbsp;Reverting&nbsp;beyond&nbsp;that&nbsp;will&nbsp;result&nbsp;in</span></div></li>
<li><div class="src-line"><a name="a883"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;an&nbsp;empty&nbsp;set&nbsp;of&nbsp;matches.&nbsp;Example:</span></div></li>
<li><div class="src-line"><a name="a884"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a885"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;//&nbsp;The&nbsp;line&nbsp;below&nbsp;returns&nbsp;the&nbsp;same&nbsp;thing&nbsp;as&nbsp;qp(document,&nbsp;'p');</span></div></li>
<li><div class="src-line"><a name="a886"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;qp(document,&nbsp;'p')-&gt;find('div')-&gt;end();</span></div></li>
<li><div class="src-line"><a name="a887"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;//&nbsp;This&nbsp;returns&nbsp;an&nbsp;empty&nbsp;array:</span></div></li>
<li><div class="src-line"><a name="a888"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;qp(document,&nbsp;'p')-&gt;end();</span></div></li>
<li><div class="src-line"><a name="a889"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;//&nbsp;This&nbsp;returns&nbsp;an&nbsp;empty&nbsp;array:</span></div></li>
<li><div class="src-line"><a name="a890"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;qp(document,&nbsp;'p')-&gt;find('div')-&gt;find('span')-&gt;end()-&gt;end();</span></div></li>
<li><div class="src-line"><a name="a891"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a892"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a893"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;last&nbsp;one&nbsp;returns&nbsp;an&nbsp;empty&nbsp;array&nbsp;because&nbsp;only&nbsp;one&nbsp;level&nbsp;of&nbsp;changes&nbsp;is&nbsp;stored.</span></div></li>
<li><div class="src-line"><a name="a894"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a895"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a896"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;QueryPath&nbsp;object&nbsp;reflecting&nbsp;the&nbsp;list&nbsp;of&nbsp;matches&nbsp;prior&nbsp;to&nbsp;the&nbsp;last&nbsp;destructive</span></div></li>
<li><div class="src-line"><a name="a897"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;operation.</span></div></li>
<li><div class="src-line"><a name="a898"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;andSelf()</span></div></li>
<li><div class="src-line"><a name="a899"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;add()</span></div></li>
<li><div class="src-line"><a name="a900"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a901"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodend">end</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a902"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a903"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a904"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Combine&nbsp;the&nbsp;current&nbsp;and&nbsp;previous&nbsp;set&nbsp;of&nbsp;matched&nbsp;objects.</span></div></li>
<li><div class="src-line"><a name="a905"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a906"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:</span></div></li>
<li><div class="src-line"><a name="a907"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a908"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;qp(document,&nbsp;'p')-&gt;find('div')-&gt;andSelf();</span></div></li>
<li><div class="src-line"><a name="a909"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a910"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;code&nbsp;above&nbsp;will&nbsp;contain&nbsp;a&nbsp;list&nbsp;of&nbsp;all&nbsp;p&nbsp;elements&nbsp;and&nbsp;all&nbsp;div&nbsp;elements&nbsp;that</span></div></li>
<li><div class="src-line"><a name="a911"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;are&nbsp;beneath&nbsp;p&nbsp;elements.</span></div></li>
<li><div class="src-line"><a name="a912"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a913"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;end();</span></div></li>
<li><div class="src-line"><a name="a914"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a915"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;QueryPath&nbsp;object&nbsp;with&nbsp;the&nbsp;results&nbsp;of&nbsp;the&nbsp;last&nbsp;two&nbsp;&quot;destructive&quot;&nbsp;operations.</span></div></li>
<li><div class="src-line"><a name="a916"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;add()</span></div></li>
<li><div class="src-line"><a name="a917"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;end()</span></div></li>
<li><div class="src-line"><a name="a918"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a919"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodandSelf">andSelf</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a920"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a921"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a922"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Remove&nbsp;all&nbsp;child&nbsp;nodes.</span></div></li>
<li><div class="src-line"><a name="a923"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a924"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;is&nbsp;equivalent&nbsp;to&nbsp;jQuery's&nbsp;empty()&nbsp;function.&nbsp;(However,&nbsp;empty()&nbsp;is&nbsp;a</span></div></li>
<li><div class="src-line"><a name="a925"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;PHP&nbsp;built-in,&nbsp;and&nbsp;cannot&nbsp;be&nbsp;used&nbsp;as&nbsp;a&nbsp;method&nbsp;name.)</span></div></li>
<li><div class="src-line"><a name="a926"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a927"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a928"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object&nbsp;with&nbsp;the&nbsp;child&nbsp;nodes&nbsp;removed.</span></div></li>
<li><div class="src-line"><a name="a929"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;replaceWith()</span></div></li>
<li><div class="src-line"><a name="a930"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;replaceAll()</span></div></li>
<li><div class="src-line"><a name="a931"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;remove()</span></div></li>
<li><div class="src-line"><a name="a932"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a933"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodremoveChildren">removeChildren</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a934"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a935"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a936"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;the&nbsp;children&nbsp;of&nbsp;the&nbsp;elements&nbsp;in&nbsp;the&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a937"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a938"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;If&nbsp;a&nbsp;selector&nbsp;is&nbsp;provided,&nbsp;the&nbsp;list&nbsp;of&nbsp;children&nbsp;will&nbsp;be&nbsp;filtered&nbsp;through</span></div></li>
<li><div class="src-line"><a name="a939"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a940"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a941"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a942"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;valid&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a943"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a944"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;QueryPath&nbsp;wrapping&nbsp;all&nbsp;of&nbsp;the&nbsp;children.</span></div></li>
<li><div class="src-line"><a name="a945"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;removeChildren()</span></div></li>
<li><div class="src-line"><a name="a946"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;parent()</span></div></li>
<li><div class="src-line"><a name="a947"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;parents()</span></div></li>
<li><div class="src-line"><a name="a948"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;next()</span></div></li>
<li><div class="src-line"><a name="a949"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;prev()</span></div></li>
<li><div class="src-line"><a name="a950"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a951"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodchildren">children</a><span class="src-sym">(</span><span class="src-var">$selector&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a952"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a953"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a954"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;all&nbsp;child&nbsp;nodes&nbsp;(not&nbsp;just&nbsp;elements)&nbsp;of&nbsp;all&nbsp;items&nbsp;in&nbsp;the&nbsp;matched&nbsp;set.</span></div></li>
<li><div class="src-line"><a name="a955"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a956"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;It&nbsp;gets&nbsp;only&nbsp;the&nbsp;immediate&nbsp;children,&nbsp;not&nbsp;all&nbsp;nodes&nbsp;in&nbsp;the&nbsp;subtree.</span></div></li>
<li><div class="src-line"><a name="a957"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a958"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;does&nbsp;not&nbsp;process&nbsp;iframes.&nbsp;Xinclude&nbsp;processing&nbsp;is&nbsp;dependent&nbsp;on&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a959"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;DOM&nbsp;implementation&nbsp;and&nbsp;configuration.</span></div></li>
<li><div class="src-line"><a name="a960"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a961"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a962"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;QueryPath&nbsp;object&nbsp;wrapping&nbsp;all&nbsp;child&nbsp;nodes&nbsp;for&nbsp;all&nbsp;elements&nbsp;in&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a963"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a964"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;find()</span></div></li>
<li><div class="src-line"><a name="a965"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;text()</span></div></li>
<li><div class="src-line"><a name="a966"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;html()</span></div></li>
<li><div class="src-line"><a name="a967"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;xml()</span></div></li>
<li><div class="src-line"><a name="a968"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a969"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodcontents">contents</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a970"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a971"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a972"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Set&nbsp;or&nbsp;get&nbsp;the&nbsp;markup&nbsp;for&nbsp;an&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a973"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a974"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;If&nbsp;$markup&nbsp;is&nbsp;set,&nbsp;then&nbsp;the&nbsp;giving&nbsp;markup&nbsp;will&nbsp;be&nbsp;injected&nbsp;into&nbsp;each</span></div></li>
<li><div class="src-line"><a name="a975"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;item&nbsp;in&nbsp;the&nbsp;set.&nbsp;All&nbsp;other&nbsp;children&nbsp;of&nbsp;that&nbsp;node&nbsp;will&nbsp;be&nbsp;deleted,&nbsp;and&nbsp;this</span></div></li>
<li><div class="src-line"><a name="a976"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;new&nbsp;code&nbsp;will&nbsp;be&nbsp;the&nbsp;only&nbsp;child&nbsp;or&nbsp;children.&nbsp;The&nbsp;markup&nbsp;MUST&nbsp;BE&nbsp;WELL&nbsp;FORMED.</span></div></li>
<li><div class="src-line"><a name="a977"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a978"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;If&nbsp;no&nbsp;markup&nbsp;is&nbsp;given,&nbsp;this&nbsp;will&nbsp;return&nbsp;a&nbsp;string&nbsp;representing&nbsp;the&nbsp;child</span></div></li>
<li><div class="src-line"><a name="a979"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;markup&nbsp;of&nbsp;the&nbsp;first&nbsp;node.</span></div></li>
<li><div class="src-line"><a name="a980"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a981"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;b&gt;Important:&lt;/b&gt;&nbsp;This&nbsp;differs&nbsp;from&nbsp;jQuery's&nbsp;html()&nbsp;function.&nbsp;This&nbsp;function</span></div></li>
<li><div class="src-line"><a name="a982"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;returns&nbsp;&lt;i&gt;the&nbsp;current&nbsp;node&lt;/i&gt;&nbsp;and&nbsp;all&nbsp;of&nbsp;its&nbsp;children.&nbsp;jQuery&nbsp;returns&nbsp;only</span></div></li>
<li><div class="src-line"><a name="a983"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;children.&nbsp;This&nbsp;means&nbsp;you&nbsp;do&nbsp;not&nbsp;need&nbsp;to&nbsp;do&nbsp;things&nbsp;like&nbsp;this:</span></div></li>
<li><div class="src-line"><a name="a984"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;$qp-&gt;parent()-&gt;html()&lt;/code&gt;.</span></div></li>
<li><div class="src-line"><a name="a985"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a986"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$markup&nbsp;</span></div></li>
<li><div class="src-line"><a name="a987"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;text&nbsp;to&nbsp;insert.</span></div></li>
<li><div class="src-line"><a name="a988"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span></div></li>
<li><div class="src-line"><a name="a989"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;string&nbsp;if&nbsp;no&nbsp;markup&nbsp;was&nbsp;passed,&nbsp;or&nbsp;a&nbsp;QueryPath&nbsp;if&nbsp;markup&nbsp;was&nbsp;passed.</span></div></li>
<li><div class="src-line"><a name="a990"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;xml()</span></div></li>
<li><div class="src-line"><a name="a991"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;text()</span></div></li>
<li><div class="src-line"><a name="a992"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;contents()</span></div></li>
<li><div class="src-line"><a name="a993"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a994"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodhtml">html</a><span class="src-sym">(</span><span class="src-var">$markup&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a995"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a996"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a997"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;or&nbsp;set&nbsp;the&nbsp;text&nbsp;contents&nbsp;of&nbsp;a&nbsp;node.</span></div></li>
<li><div class="src-line"><a name="a998"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$text&nbsp;</span></div></li>
<li><div class="src-line"><a name="a999"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;If&nbsp;this&nbsp;is&nbsp;not&nbsp;NULL,&nbsp;this&nbsp;value&nbsp;will&nbsp;be&nbsp;set&nbsp;as&nbsp;the&nbsp;text&nbsp;of&nbsp;the&nbsp;node.&nbsp;It</span></div></li>
<li><div class="src-line"><a name="a1000"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;will&nbsp;replace&nbsp;any&nbsp;existing&nbsp;content.</span></div></li>
<li><div class="src-line"><a name="a1001"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1002"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;QueryPath&nbsp;if&nbsp;$text&nbsp;is&nbsp;set,&nbsp;or&nbsp;the&nbsp;text&nbsp;content&nbsp;if&nbsp;no&nbsp;text</span></div></li>
<li><div class="src-line"><a name="a1003"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;is&nbsp;passed&nbsp;in&nbsp;as&nbsp;a&nbsp;pram.</span></div></li>
<li><div class="src-line"><a name="a1004"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;html()</span></div></li>
<li><div class="src-line"><a name="a1005"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;xml()</span></div></li>
<li><div class="src-line"><a name="a1006"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;contents()</span></div></li>
<li><div class="src-line"><a name="a1007"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1008"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodtext">text</a><span class="src-sym">(</span><span class="src-var">$text&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1009"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1010"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1011"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Set&nbsp;or&nbsp;get&nbsp;the&nbsp;XML&nbsp;markup&nbsp;for&nbsp;an&nbsp;element&nbsp;or&nbsp;elements.</span></div></li>
<li><div class="src-line"><a name="a1012"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1013"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Like&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;html()}</span><span class="src-doc">,&nbsp;this&nbsp;functions&nbsp;in&nbsp;both&nbsp;a&nbsp;setter&nbsp;and&nbsp;a&nbsp;getter&nbsp;mode.</span></div></li>
<li><div class="src-line"><a name="a1014"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1015"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;In&nbsp;setter&nbsp;mode,&nbsp;the&nbsp;string&nbsp;passed&nbsp;in&nbsp;will&nbsp;be&nbsp;parsed&nbsp;and&nbsp;then&nbsp;appended&nbsp;to&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a1016"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;elements&nbsp;wrapped&nbsp;by&nbsp;this&nbsp;QueryPath&nbsp;object.When&nbsp;in&nbsp;setter&nbsp;mode,&nbsp;this&nbsp;parses</span></div></li>
<li><div class="src-line"><a name="a1017"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;XML&nbsp;using&nbsp;the&nbsp;DOMFragment&nbsp;parser.&nbsp;For&nbsp;that&nbsp;reason,&nbsp;an&nbsp;XML&nbsp;declaration</span></div></li>
<li><div class="src-line"><a name="a1018"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;is&nbsp;not&nbsp;necessary.</span></div></li>
<li><div class="src-line"><a name="a1019"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1020"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;In&nbsp;getter&nbsp;mode,&nbsp;the&nbsp;first&nbsp;element&nbsp;wrapped&nbsp;by&nbsp;this&nbsp;QueryPath&nbsp;object&nbsp;will&nbsp;be</span></div></li>
<li><div class="src-line"><a name="a1021"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;converted&nbsp;to&nbsp;an&nbsp;XML&nbsp;string&nbsp;and&nbsp;returned.</span></div></li>
<li><div class="src-line"><a name="a1022"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1023"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$markup&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1024"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;string&nbsp;containing&nbsp;XML&nbsp;data.</span></div></li>
<li><div class="src-line"><a name="a1025"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1026"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;If&nbsp;markup&nbsp;is&nbsp;passed&nbsp;in,&nbsp;a&nbsp;QueryPath&nbsp;is&nbsp;returned.&nbsp;If&nbsp;no&nbsp;markup&nbsp;is&nbsp;passed</span></div></li>
<li><div class="src-line"><a name="a1027"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;in,&nbsp;XML&nbsp;representing&nbsp;the&nbsp;first&nbsp;matched&nbsp;element&nbsp;is&nbsp;returned.</span></div></li>
<li><div class="src-line"><a name="a1028"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;html()</span></div></li>
<li><div class="src-line"><a name="a1029"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;text()</span></div></li>
<li><div class="src-line"><a name="a1030"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;content()</span></div></li>
<li><div class="src-line"><a name="a1031"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1032"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodxml">xml</a><span class="src-sym">(</span><span class="src-var">$markup&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1033"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1034"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1035"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Send&nbsp;the&nbsp;XML&nbsp;document&nbsp;to&nbsp;the&nbsp;client.</span></div></li>
<li><div class="src-line"><a name="a1036"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1037"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Write&nbsp;the&nbsp;document&nbsp;to&nbsp;stdout&nbsp;(usually&nbsp;the&nbsp;client).</span></div></li>
<li><div class="src-line"><a name="a1038"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1039"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;prints&nbsp;the&nbsp;entire&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a1040"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1041"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1042"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object,&nbsp;unmodified.</span></div></li>
<li><div class="src-line"><a name="a1043"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;xml()</span></div></li>
<li><div class="src-line"><a name="a1044"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1045"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodwriteXML">writeXML</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1046"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1047"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1048"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Send&nbsp;the&nbsp;HTML&nbsp;to&nbsp;the&nbsp;client.</span></div></li>
<li><div class="src-line"><a name="a1049"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1050"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Write&nbsp;the&nbsp;document&nbsp;to&nbsp;stdout&nbsp;(usually&nbsp;the&nbsp;client).</span></div></li>
<li><div class="src-line"><a name="a1051"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1052"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object,&nbsp;unmodified.</span></div></li>
<li><div class="src-line"><a name="a1053"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;html()</span></div></li>
<li><div class="src-line"><a name="a1054"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1055"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodwriteHTML">writeHTML</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1056"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1057"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1058"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Set&nbsp;or&nbsp;get&nbsp;the&nbsp;value&nbsp;of&nbsp;an&nbsp;element's&nbsp;'value'&nbsp;attribute.</span></div></li>
<li><div class="src-line"><a name="a1059"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1060"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;'value'&nbsp;attribute&nbsp;is&nbsp;common&nbsp;in&nbsp;HTML&nbsp;form&nbsp;elements.&nbsp;This&nbsp;is&nbsp;a</span></div></li>
<li><div class="src-line"><a name="a1061"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;convenience&nbsp;function&nbsp;for&nbsp;accessing&nbsp;the&nbsp;values.&nbsp;Since&nbsp;this&nbsp;is&nbsp;not&nbsp;&nbsp;common</span></div></li>
<li><div class="src-line"><a name="a1062"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;task&nbsp;on&nbsp;the&nbsp;server&nbsp;side,&nbsp;this&nbsp;method&nbsp;may&nbsp;be&nbsp;removed&nbsp;in&nbsp;future&nbsp;releases.&nbsp;(It</span></div></li>
<li><div class="src-line"><a name="a1063"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;is&nbsp;currently&nbsp;provided&nbsp;for&nbsp;jQuery&nbsp;compatibility.)</span></div></li>
<li><div class="src-line"><a name="a1064"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1065"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;If&nbsp;a&nbsp;value&nbsp;is&nbsp;provided&nbsp;in&nbsp;the&nbsp;params,&nbsp;then&nbsp;the&nbsp;value&nbsp;will&nbsp;be&nbsp;set&nbsp;for&nbsp;all</span></div></li>
<li><div class="src-line"><a name="a1066"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;matches.&nbsp;If&nbsp;no&nbsp;params&nbsp;are&nbsp;given,&nbsp;then&nbsp;the&nbsp;value&nbsp;of&nbsp;the&nbsp;first&nbsp;matched&nbsp;element</span></div></li>
<li><div class="src-line"><a name="a1067"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;will&nbsp;be&nbsp;returned.&nbsp;This&nbsp;may&nbsp;be&nbsp;NULL.</span></div></li>
<li><div class="src-line"><a name="a1068"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1069"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@deprecated</span><span class="src-doc">&nbsp;Just&nbsp;use&nbsp;attr().&nbsp;There's&nbsp;no&nbsp;reason&nbsp;to&nbsp;use&nbsp;this&nbsp;on&nbsp;the&nbsp;server.</span></div></li>
<li><div class="src-line"><a name="a1070"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;attr()</span></div></li>
<li><div class="src-line"><a name="a1071"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1072"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1073"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Returns&nbsp;a&nbsp;QueryPath&nbsp;if&nbsp;a&nbsp;string&nbsp;was&nbsp;passed&nbsp;in,&nbsp;and&nbsp;a&nbsp;string&nbsp;if&nbsp;no&nbsp;string</span></div></li>
<li><div class="src-line"><a name="a1074"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;was&nbsp;passed&nbsp;in.&nbsp;In&nbsp;the&nbsp;later&nbsp;case,&nbsp;an&nbsp;error&nbsp;will&nbsp;produce&nbsp;NULL.</span></div></li>
<li><div class="src-line"><a name="a1075"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1076"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodval">val</a><span class="src-sym">(</span><span class="src-var">$value&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1077"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1078"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1079"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;a&nbsp;list&nbsp;of&nbsp;siblings&nbsp;for&nbsp;elements&nbsp;currently&nbsp;wrapped&nbsp;by&nbsp;this&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a1080"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1081"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;will&nbsp;compile&nbsp;a&nbsp;list&nbsp;of&nbsp;every&nbsp;sibling&nbsp;of&nbsp;every&nbsp;element&nbsp;in&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a1082"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;current&nbsp;list&nbsp;of&nbsp;elements.</span></div></li>
<li><div class="src-line"><a name="a1083"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1084"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Note&nbsp;that&nbsp;if&nbsp;two&nbsp;siblings&nbsp;are&nbsp;present&nbsp;in&nbsp;the&nbsp;QueryPath&nbsp;object&nbsp;to&nbsp;begin&nbsp;with,</span></div></li>
<li><div class="src-line"><a name="a1085"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;then&nbsp;both&nbsp;will&nbsp;be&nbsp;returned&nbsp;in&nbsp;the&nbsp;matched&nbsp;set,&nbsp;since&nbsp;they&nbsp;are&nbsp;siblings&nbsp;of&nbsp;each</span></div></li>
<li><div class="src-line"><a name="a1086"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;other.&nbsp;In&nbsp;other&nbsp;words,if&nbsp;the&nbsp;matches&nbsp;contain&nbsp;a&nbsp;and&nbsp;b,&nbsp;and&nbsp;a&nbsp;and&nbsp;b&nbsp;are&nbsp;siblings&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a1087"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;each&nbsp;other,&nbsp;than&nbsp;running&nbsp;siblings&nbsp;will&nbsp;return&nbsp;a&nbsp;set&nbsp;that&nbsp;contains</span></div></li>
<li><div class="src-line"><a name="a1088"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;both&nbsp;a&nbsp;and&nbsp;b.</span></div></li>
<li><div class="src-line"><a name="a1089"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1090"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1091"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;If&nbsp;the&nbsp;optional&nbsp;selector&nbsp;is&nbsp;provided,&nbsp;siblings&nbsp;will&nbsp;be&nbsp;filtered&nbsp;through</span></div></li>
<li><div class="src-line"><a name="a1092"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;this&nbsp;expression.</span></div></li>
<li><div class="src-line"><a name="a1093"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1094"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;containing&nbsp;the&nbsp;matched&nbsp;siblings.</span></div></li>
<li><div class="src-line"><a name="a1095"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;contents()</span></div></li>
<li><div class="src-line"><a name="a1096"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;children()</span></div></li>
<li><div class="src-line"><a name="a1097"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;parent()</span></div></li>
<li><div class="src-line"><a name="a1098"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;parents()</span></div></li>
<li><div class="src-line"><a name="a1099"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1100"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodsiblings">siblings</a><span class="src-sym">(</span><span class="src-var">$selector&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1101"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1102"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1103"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;the&nbsp;next&nbsp;sibling&nbsp;of&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a1104"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1105"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;If&nbsp;a&nbsp;selector&nbsp;is&nbsp;provided,&nbsp;the&nbsp;next&nbsp;matching&nbsp;sibling&nbsp;will&nbsp;be&nbsp;returned.</span></div></li>
<li><div class="src-line"><a name="a1106"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1107"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1108"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;CSS3&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a1109"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1110"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a1111"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;nextAll()</span></div></li>
<li><div class="src-line"><a name="a1112"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;prev()</span></div></li>
<li><div class="src-line"><a name="a1113"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;children()</span></div></li>
<li><div class="src-line"><a name="a1114"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;contents()</span></div></li>
<li><div class="src-line"><a name="a1115"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;parent()</span></div></li>
<li><div class="src-line"><a name="a1116"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;parents()</span></div></li>
<li><div class="src-line"><a name="a1117"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1118"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodnext">next</a><span class="src-sym">(</span><span class="src-var">$selector&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1119"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1120"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1121"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1122"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;all&nbsp;siblings&nbsp;after&nbsp;an&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a1123"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1124"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;For&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;QueryPath,&nbsp;get&nbsp;all&nbsp;siblings&nbsp;that&nbsp;appear&nbsp;after</span></div></li>
<li><div class="src-line"><a name="a1125"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;it.&nbsp;If&nbsp;a&nbsp;selector&nbsp;is&nbsp;passed&nbsp;in,&nbsp;then&nbsp;only&nbsp;siblings&nbsp;that&nbsp;match&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a1126"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;selector&nbsp;will&nbsp;be&nbsp;included.</span></div></li>
<li><div class="src-line"><a name="a1127"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1128"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1129"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;valid&nbsp;CSS&nbsp;3&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a1130"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1131"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object,&nbsp;now&nbsp;containing&nbsp;the&nbsp;matching&nbsp;siblings.</span></div></li>
<li><div class="src-line"><a name="a1132"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;next()</span></div></li>
<li><div class="src-line"><a name="a1133"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;prevAll()</span></div></li>
<li><div class="src-line"><a name="a1134"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;children()</span></div></li>
<li><div class="src-line"><a name="a1135"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;siblings()</span></div></li>
<li><div class="src-line"><a name="a1136"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1137"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodnextAll">nextAll</a><span class="src-sym">(</span><span class="src-var">$selector&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1138"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1139"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1140"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;the&nbsp;next&nbsp;sibling&nbsp;before&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a1141"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1142"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;For&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;QueryPath,&nbsp;this&nbsp;retrieves&nbsp;the&nbsp;previous&nbsp;sibling</span></div></li>
<li><div class="src-line"><a name="a1143"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;(if&nbsp;any).&nbsp;If&nbsp;a&nbsp;selector&nbsp;is&nbsp;supplied,&nbsp;it&nbsp;retrieves&nbsp;the&nbsp;first&nbsp;matching</span></div></li>
<li><div class="src-line"><a name="a1144"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;sibling&nbsp;(if&nbsp;any&nbsp;is&nbsp;found).</span></div></li>
<li><div class="src-line"><a name="a1145"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1146"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1147"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;valid&nbsp;CSS&nbsp;3&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a1148"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1149"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;QueryPath&nbsp;object,&nbsp;now&nbsp;containing&nbsp;any&nbsp;previous&nbsp;siblings&nbsp;that&nbsp;have&nbsp;been</span></div></li>
<li><div class="src-line"><a name="a1150"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;found.</span></div></li>
<li><div class="src-line"><a name="a1151"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;prevAll()</span></div></li>
<li><div class="src-line"><a name="a1152"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;next()</span></div></li>
<li><div class="src-line"><a name="a1153"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;siblings()</span></div></li>
<li><div class="src-line"><a name="a1154"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;children()</span></div></li>
<li><div class="src-line"><a name="a1155"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1156"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodprev">prev</a><span class="src-sym">(</span><span class="src-var">$selector&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1157"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1158"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1159"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;the&nbsp;previous&nbsp;siblings&nbsp;for&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a1160"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1161"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;For&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;QueryPath,&nbsp;get&nbsp;all&nbsp;previous&nbsp;siblings.&nbsp;If&nbsp;a</span></div></li>
<li><div class="src-line"><a name="a1162"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;selector&nbsp;is&nbsp;provided,&nbsp;only&nbsp;matching&nbsp;siblings&nbsp;will&nbsp;be&nbsp;retrieved.</span></div></li>
<li><div class="src-line"><a name="a1163"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1164"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1165"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;valid&nbsp;CSS&nbsp;3&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a1166"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1167"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;QueryPath&nbsp;object,&nbsp;now&nbsp;wrapping&nbsp;previous&nbsp;sibling&nbsp;elements.</span></div></li>
<li><div class="src-line"><a name="a1168"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;prev()</span></div></li>
<li><div class="src-line"><a name="a1169"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;nextAll()</span></div></li>
<li><div class="src-line"><a name="a1170"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;siblings()</span></div></li>
<li><div class="src-line"><a name="a1171"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;contents()</span></div></li>
<li><div class="src-line"><a name="a1172"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;children()</span></div></li>
<li><div class="src-line"><a name="a1173"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1174"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodprevAll">prevAll</a><span class="src-sym">(</span><span class="src-var">$selector&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1175"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1176"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1177"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;the&nbsp;immediate&nbsp;parent&nbsp;of&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a1178"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1179"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;If&nbsp;a&nbsp;selector&nbsp;is&nbsp;passed,&nbsp;this&nbsp;will&nbsp;return&nbsp;the&nbsp;nearest&nbsp;matching&nbsp;parent&nbsp;for</span></div></li>
<li><div class="src-line"><a name="a1180"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a1181"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1182"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1183"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;valid&nbsp;CSS3&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a1184"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1185"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;QueryPath&nbsp;object&nbsp;wrapping&nbsp;the&nbsp;matching&nbsp;parents.</span></div></li>
<li><div class="src-line"><a name="a1186"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;children()</span></div></li>
<li><div class="src-line"><a name="a1187"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;siblings()</span></div></li>
<li><div class="src-line"><a name="a1188"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;parents()</span></div></li>
<li><div class="src-line"><a name="a1189"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1190"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodparent">parent</a><span class="src-sym">(</span><span class="src-var">$selector&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1191"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1192"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;all&nbsp;ancestors&nbsp;of&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a1193"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1194"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;If&nbsp;a&nbsp;selector&nbsp;is&nbsp;present,&nbsp;only&nbsp;matching&nbsp;ancestors&nbsp;will&nbsp;be&nbsp;retrieved.</span></div></li>
<li><div class="src-line"><a name="a1195"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1196"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;parent()</span></div></li>
<li><div class="src-line"><a name="a1197"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$selector&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1198"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;valid&nbsp;CSS&nbsp;3&nbsp;Selector.</span></div></li>
<li><div class="src-line"><a name="a1199"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1200"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;QueryPath&nbsp;object&nbsp;containing&nbsp;the&nbsp;matching&nbsp;ancestors.</span></div></li>
<li><div class="src-line"><a name="a1201"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;siblings()</span></div></li>
<li><div class="src-line"><a name="a1202"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;children()</span></div></li>
<li><div class="src-line"><a name="a1203"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1204"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodparents">parents</a><span class="src-sym">(</span><span class="src-var">$selector&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1205"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1206"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1207"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Set/get&nbsp;a&nbsp;CSS&nbsp;value&nbsp;for&nbsp;the&nbsp;current&nbsp;element(s).</span></div></li>
<li><div class="src-line"><a name="a1208"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;sets&nbsp;the&nbsp;CSS&nbsp;value&nbsp;for&nbsp;each&nbsp;element&nbsp;in&nbsp;the&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a1209"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;It&nbsp;does&nbsp;this&nbsp;by&nbsp;setting&nbsp;(or&nbsp;getting)&nbsp;the&nbsp;style&nbsp;attribute&nbsp;(without&nbsp;a&nbsp;namespace).</span></div></li>
<li><div class="src-line"><a name="a1210"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1211"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;For&nbsp;example,&nbsp;consider&nbsp;this&nbsp;code:</span></div></li>
<li><div class="src-line"><a name="a1212"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a1213"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;?php</span></div></li>
<li><div class="src-line"><a name="a1214"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;qp(HTML_STUB,&nbsp;'body')-&gt;css('background-color','red')-&gt;html();</span></div></li>
<li><div class="src-line"><a name="a1215"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;?&gt;</span></div></li>
<li><div class="src-line"><a name="a1216"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a1217"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;will&nbsp;return&nbsp;the&nbsp;following&nbsp;HTML:</span></div></li>
<li><div class="src-line"><a name="a1218"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a1219"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;body&nbsp;style=&quot;background-color:&nbsp;red&quot;/&gt;</span></div></li>
<li><div class="src-line"><a name="a1220"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a1221"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1222"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;If&nbsp;no&nbsp;parameters&nbsp;are&nbsp;passed&nbsp;into&nbsp;this&nbsp;function,&nbsp;then&nbsp;the&nbsp;current&nbsp;style</span></div></li>
<li><div class="src-line"><a name="a1223"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;element&nbsp;will&nbsp;be&nbsp;returned&nbsp;unparsed.&nbsp;Example:</span></div></li>
<li><div class="src-line"><a name="a1224"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a1225"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;?php</span></div></li>
<li><div class="src-line"><a name="a1226"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;qp(HTML_STUB,&nbsp;'body')-&gt;css('background-color','red')-&gt;css();</span></div></li>
<li><div class="src-line"><a name="a1227"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;?&gt;</span></div></li>
<li><div class="src-line"><a name="a1228"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a1229"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;will&nbsp;return&nbsp;the&nbsp;following:</span></div></li>
<li><div class="src-line"><a name="a1230"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a1231"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;background-color:&nbsp;red</span></div></li>
<li><div class="src-line"><a name="a1232"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a1233"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1234"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span><span class="src-doc-var">$name&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1235"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;If&nbsp;this&nbsp;is&nbsp;a&nbsp;string,&nbsp;it&nbsp;will&nbsp;be&nbsp;used&nbsp;as&nbsp;a&nbsp;CSS&nbsp;name.&nbsp;If&nbsp;it&nbsp;is&nbsp;an&nbsp;array,</span></div></li>
<li><div class="src-line"><a name="a1236"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;this&nbsp;will&nbsp;assume&nbsp;it&nbsp;is&nbsp;an&nbsp;array&nbsp;of&nbsp;name/value&nbsp;pairs&nbsp;of&nbsp;CSS&nbsp;rules.&nbsp;It&nbsp;will</span></div></li>
<li><div class="src-line"><a name="a1237"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;apply&nbsp;all&nbsp;rules&nbsp;to&nbsp;all&nbsp;elements&nbsp;in&nbsp;the&nbsp;set.</span></div></li>
<li><div class="src-line"><a name="a1238"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1239"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1240"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodcss">css</a><span class="src-sym">(</span><span class="src-var">$name&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value&nbsp;</span>=&nbsp;<span class="src-str">''</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1241"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1242"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Add&nbsp;a&nbsp;class&nbsp;to&nbsp;all&nbsp;elements&nbsp;in&nbsp;the&nbsp;current&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a1243"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1244"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;searchers&nbsp;for&nbsp;a&nbsp;class&nbsp;attribute&nbsp;on&nbsp;each&nbsp;item&nbsp;wrapped&nbsp;by&nbsp;the&nbsp;current</span></div></li>
<li><div class="src-line"><a name="a1245"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;QueryPath&nbsp;object.&nbsp;If&nbsp;no&nbsp;attribute&nbsp;is&nbsp;found,&nbsp;a&nbsp;new&nbsp;one&nbsp;is&nbsp;added&nbsp;and&nbsp;its&nbsp;value</span></div></li>
<li><div class="src-line"><a name="a1246"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;is&nbsp;set&nbsp;to&nbsp;$class.&nbsp;If&nbsp;a&nbsp;class&nbsp;attribute&nbsp;is&nbsp;found,&nbsp;then&nbsp;the&nbsp;value&nbsp;is&nbsp;appended</span></div></li>
<li><div class="src-line"><a name="a1247"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;on&nbsp;to&nbsp;the&nbsp;end.</span></div></li>
<li><div class="src-line"><a name="a1248"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1249"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$class&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1250"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;name&nbsp;of&nbsp;the&nbsp;class.</span></div></li>
<li><div class="src-line"><a name="a1251"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1252"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Returns&nbsp;the&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a1253"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;css()</span></div></li>
<li><div class="src-line"><a name="a1254"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;attr()</span></div></li>
<li><div class="src-line"><a name="a1255"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;removeClass()</span></div></li>
<li><div class="src-line"><a name="a1256"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;hasClass()</span></div></li>
<li><div class="src-line"><a name="a1257"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1258"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodaddClass">addClass</a><span class="src-sym">(</span><span class="src-var">$class</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1259"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1260"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Remove&nbsp;the&nbsp;named&nbsp;class&nbsp;from&nbsp;any&nbsp;element&nbsp;in&nbsp;the&nbsp;QueryPath&nbsp;that&nbsp;has&nbsp;it.</span></div></li>
<li><div class="src-line"><a name="a1261"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1262"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;may&nbsp;result&nbsp;in&nbsp;the&nbsp;entire&nbsp;class&nbsp;attribute&nbsp;being&nbsp;removed.&nbsp;If&nbsp;there</span></div></li>
<li><div class="src-line"><a name="a1263"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;are&nbsp;other&nbsp;items&nbsp;in&nbsp;the&nbsp;class&nbsp;attribute,&nbsp;though,&nbsp;they&nbsp;will&nbsp;not&nbsp;be&nbsp;removed.</span></div></li>
<li><div class="src-line"><a name="a1264"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1265"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:</span></div></li>
<li><div class="src-line"><a name="a1266"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Consider&nbsp;this&nbsp;XML:</span></div></li>
<li><div class="src-line"><a name="a1267"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a1268"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;element&nbsp;class=&quot;first&nbsp;second&quot;/&gt;</span></div></li>
<li><div class="src-line"><a name="a1269"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a1270"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1271"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Executing&nbsp;this&nbsp;fragment&nbsp;of&nbsp;code&nbsp;will&nbsp;remove&nbsp;only&nbsp;the&nbsp;'first'&nbsp;class:</span></div></li>
<li><div class="src-line"><a name="a1272"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a1273"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;qp(document,&nbsp;'element')-&gt;removeClass('first');</span></div></li>
<li><div class="src-line"><a name="a1274"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a1275"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1276"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;resulting&nbsp;XML&nbsp;will&nbsp;be:</span></div></li>
<li><div class="src-line"><a name="a1277"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a1278"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;element&nbsp;class=&quot;second&quot;/&gt;</span></div></li>
<li><div class="src-line"><a name="a1279"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a1280"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1281"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;To&nbsp;remove&nbsp;the&nbsp;entire&nbsp;'class'&nbsp;attribute,&nbsp;you&nbsp;should&nbsp;use&nbsp;{@see&nbsp;removeAttr()}.</span></div></li>
<li><div class="src-line"><a name="a1282"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1283"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$class&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1284"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;class&nbsp;name&nbsp;to&nbsp;remove.</span></div></li>
<li><div class="src-line"><a name="a1285"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1286"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;modified&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a1287"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;attr()</span></div></li>
<li><div class="src-line"><a name="a1288"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;addClass()</span></div></li>
<li><div class="src-line"><a name="a1289"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;hasClass()</span></div></li>
<li><div class="src-line"><a name="a1290"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1291"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodremoveClass">removeClass</a><span class="src-sym">(</span><span class="src-var">$class</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1292"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1293"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Returns&nbsp;TRUE&nbsp;if&nbsp;any&nbsp;of&nbsp;the&nbsp;elements&nbsp;in&nbsp;the&nbsp;QueryPath&nbsp;have&nbsp;the&nbsp;specified&nbsp;class.</span></div></li>
<li><div class="src-line"><a name="a1294"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1295"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$class&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1296"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;name&nbsp;of&nbsp;the&nbsp;class.</span></div></li>
<li><div class="src-line"><a name="a1297"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1298"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;TRUE&nbsp;if&nbsp;the&nbsp;class&nbsp;exists&nbsp;in&nbsp;one&nbsp;or&nbsp;more&nbsp;of&nbsp;the&nbsp;elements,&nbsp;FALSE&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a1299"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;addClass()</span></div></li>
<li><div class="src-line"><a name="a1300"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;removeClass()</span></div></li>
<li><div class="src-line"><a name="a1301"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1302"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodhasClass">hasClass</a><span class="src-sym">(</span><span class="src-var">$class</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1303"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1304"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1305"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Perform&nbsp;a&nbsp;deep&nbsp;clone&nbsp;of&nbsp;each&nbsp;node&nbsp;in&nbsp;the&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a1306"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1307"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;does&nbsp;not&nbsp;clone&nbsp;the&nbsp;QueryPath&nbsp;object,&nbsp;but&nbsp;instead&nbsp;clones&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a1308"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;list&nbsp;of&nbsp;nodes&nbsp;wrapped&nbsp;by&nbsp;the&nbsp;QueryPath.&nbsp;Every&nbsp;element&nbsp;is&nbsp;deeply</span></div></li>
<li><div class="src-line"><a name="a1309"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;cloned.</span></div></li>
<li><div class="src-line"><a name="a1310"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1311"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;method&nbsp;is&nbsp;analogous&nbsp;to&nbsp;jQuery's&nbsp;clone()&nbsp;method.</span></div></li>
<li><div class="src-line"><a name="a1312"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1313"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;is&nbsp;a&nbsp;destructive&nbsp;operation,&nbsp;which&nbsp;means&nbsp;that&nbsp;end()&nbsp;will&nbsp;revert</span></div></li>
<li><div class="src-line"><a name="a1314"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;list&nbsp;back&nbsp;to&nbsp;the&nbsp;clone's&nbsp;original.</span></div></li>
<li><div class="src-line"><a name="a1315"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;qp()</span></div></li>
<li><div class="src-line"><a name="a1316"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1317"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1318"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodcloneAll">cloneAll</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1319"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1320"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1321"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Branch&nbsp;the&nbsp;base&nbsp;QueryPath&nbsp;into&nbsp;another&nbsp;one&nbsp;with&nbsp;the&nbsp;same&nbsp;matches.</span></div></li>
<li><div class="src-line"><a name="a1322"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1323"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;function&nbsp;makes&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;QueryPath&nbsp;object,&nbsp;but&nbsp;keeps&nbsp;the&nbsp;new&nbsp;copy</span></div></li>
<li><div class="src-line"><a name="a1324"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;(initially)&nbsp;pointed&nbsp;at&nbsp;the&nbsp;same&nbsp;matches.&nbsp;This&nbsp;object&nbsp;can&nbsp;then&nbsp;be&nbsp;queried&nbsp;without</span></div></li>
<li><div class="src-line"><a name="a1325"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;changing&nbsp;the&nbsp;original&nbsp;QueryPath.&nbsp;However,&nbsp;changes&nbsp;to&nbsp;the&nbsp;elements&nbsp;inside&nbsp;of&nbsp;this</span></div></li>
<li><div class="src-line"><a name="a1326"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;QueryPath&nbsp;will&nbsp;show&nbsp;up&nbsp;in&nbsp;the&nbsp;QueryPath&nbsp;from&nbsp;which&nbsp;it&nbsp;is&nbsp;branched.</span></div></li>
<li><div class="src-line"><a name="a1327"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1328"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Compare&nbsp;this&nbsp;operation&nbsp;with&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;cloneAll()}</span><span class="src-doc">.&nbsp;The&nbsp;cloneAll()&nbsp;call&nbsp;takes</span></div></li>
<li><div class="src-line"><a name="a1329"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;current&nbsp;QueryPath&nbsp;object&nbsp;and&nbsp;makes&nbsp;a&nbsp;copy&nbsp;of&nbsp;all&nbsp;of&nbsp;its&nbsp;matches.&nbsp;You&nbsp;continue</span></div></li>
<li><div class="src-line"><a name="a1330"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;to&nbsp;operate&nbsp;on&nbsp;the&nbsp;same&nbsp;QueryPath&nbsp;object,&nbsp;but&nbsp;the&nbsp;elements&nbsp;inside&nbsp;of&nbsp;the&nbsp;QueryPath</span></div></li>
<li><div class="src-line"><a name="a1331"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;are&nbsp;copies&nbsp;of&nbsp;those&nbsp;before&nbsp;the&nbsp;call&nbsp;to&nbsp;cloneAll().</span></div></li>
<li><div class="src-line"><a name="a1332"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1333"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This,&nbsp;on&nbsp;the&nbsp;other&nbsp;hand,&nbsp;copies&nbsp;&lt;i&gt;the&nbsp;QueryPath&lt;/i&gt;,&nbsp;but&nbsp;keeps&nbsp;valid</span></div></li>
<li><div class="src-line"><a name="a1334"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;references&nbsp;to&nbsp;the&nbsp;document&nbsp;and&nbsp;the&nbsp;wrapped&nbsp;elements.&nbsp;A&nbsp;new&nbsp;query&nbsp;branch&nbsp;is</span></div></li>
<li><div class="src-line"><a name="a1335"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;created,&nbsp;but&nbsp;any&nbsp;changes&nbsp;will&nbsp;be&nbsp;written&nbsp;back&nbsp;to&nbsp;the&nbsp;same&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a1336"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1337"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;In&nbsp;practice,&nbsp;this&nbsp;comes&nbsp;in&nbsp;handy&nbsp;when&nbsp;you&nbsp;want&nbsp;to&nbsp;do&nbsp;multiple&nbsp;queries&nbsp;on&nbsp;a&nbsp;part</span></div></li>
<li><div class="src-line"><a name="a1338"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;of&nbsp;the&nbsp;document,&nbsp;but&nbsp;then&nbsp;return&nbsp;to&nbsp;a&nbsp;previous&nbsp;set&nbsp;of&nbsp;matches.&nbsp;(see&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;QPTPL}</span></div></li>
<li><div class="src-line"><a name="a1339"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;for&nbsp;examples&nbsp;of&nbsp;this&nbsp;in&nbsp;practice).</span></div></li>
<li><div class="src-line"><a name="a1340"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1341"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:</span></div></li>
<li><div class="src-line"><a name="a1342"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a1343"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;?php</span></div></li>
<li><div class="src-line"><a name="a1344"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;$qp&nbsp;=&nbsp;qp(QueryPath::HTML_STUB);</span></div></li>
<li><div class="src-line"><a name="a1345"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;$branch&nbsp;=&nbsp;$qp-&gt;branch();</span></div></li>
<li><div class="src-line"><a name="a1346"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;$branch-&gt;find('title')-&gt;text('Title');</span></div></li>
<li><div class="src-line"><a name="a1347"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;$qp-&gt;find('body')-&gt;text('This&nbsp;is&nbsp;the&nbsp;body')-&gt;writeHTML;</span></div></li>
<li><div class="src-line"><a name="a1348"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;?&gt;</span></div></li>
<li><div class="src-line"><a name="a1349"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a1350"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Notice&nbsp;that&nbsp;in&nbsp;the&nbsp;code,&nbsp;each&nbsp;of&nbsp;the&nbsp;QueryPath&nbsp;objects&nbsp;is&nbsp;doing&nbsp;its&nbsp;own</span></div></li>
<li><div class="src-line"><a name="a1351"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;query.&nbsp;However,&nbsp;both&nbsp;are&nbsp;modifying&nbsp;the&nbsp;same&nbsp;document.&nbsp;The&nbsp;result&nbsp;of&nbsp;the&nbsp;above</span></div></li>
<li><div class="src-line"><a name="a1352"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;would&nbsp;look&nbsp;something&nbsp;like&nbsp;this:</span></div></li>
<li><div class="src-line"><a name="a1353"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a1354"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;!DOCTYPE&nbsp;html&nbsp;PUBLIC&nbsp;&quot;-//W3C//DTD&nbsp;XHTML&nbsp;1.0&nbsp;Strict//EN&quot;&nbsp;&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span></div></li>
<li><div class="src-line"><a name="a1355"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;html&nbsp;xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;</span></div></li>
<li><div class="src-line"><a name="a1356"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;head&gt;</span></div></li>
<li><div class="src-line"><a name="a1357"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&lt;meta&nbsp;http-equiv=&quot;Content-Type&quot;&nbsp;content=&quot;text/html;&nbsp;charset=utf-8&quot;&gt;&lt;/meta&gt;</span></div></li>
<li><div class="src-line"><a name="a1358"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;Title&lt;/title&gt;</span></div></li>
<li><div class="src-line"><a name="a1359"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/head&gt;</span></div></li>
<li><div class="src-line"><a name="a1360"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;body&gt;This&nbsp;is&nbsp;the&nbsp;body&lt;/body&gt;</span></div></li>
<li><div class="src-line"><a name="a1361"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/html&gt;</span></div></li>
<li><div class="src-line"><a name="a1362"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a1363"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1364"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Notice&nbsp;that&nbsp;while&nbsp;$qp&nbsp;and&nbsp;$banch&nbsp;were&nbsp;performing&nbsp;separate&nbsp;queries,&nbsp;they</span></div></li>
<li><div class="src-line"><a name="a1365"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;both&nbsp;modified&nbsp;the&nbsp;same&nbsp;document.</span></div></li>
<li><div class="src-line"><a name="a1366"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1367"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;In&nbsp;jQuery&nbsp;or&nbsp;a&nbsp;browser-based&nbsp;solution,&nbsp;you&nbsp;generally&nbsp;do&nbsp;not&nbsp;need&nbsp;a&nbsp;branching</span></div></li>
<li><div class="src-line"><a name="a1368"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;function&nbsp;because&nbsp;there&nbsp;is&nbsp;(implicitly)&nbsp;only&nbsp;one&nbsp;document.&nbsp;In&nbsp;QueryPath,&nbsp;there</span></div></li>
<li><div class="src-line"><a name="a1369"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;is&nbsp;no&nbsp;implicit&nbsp;document.&nbsp;Every&nbsp;document&nbsp;must&nbsp;be&nbsp;explicitly&nbsp;specified&nbsp;(and,</span></div></li>
<li><div class="src-line"><a name="a1370"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;in&nbsp;most&nbsp;cases,&nbsp;parsed&nbsp;--&nbsp;which&nbsp;is&nbsp;costly).&nbsp;Branching&nbsp;makes&nbsp;it&nbsp;possible&nbsp;to</span></div></li>
<li><div class="src-line"><a name="a1371"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;work&nbsp;on&nbsp;one&nbsp;document&nbsp;with&nbsp;multiple&nbsp;QueryPath&nbsp;objects.</span></div></li>
<li><div class="src-line"><a name="a1372"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1373"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">QueryPath&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1374"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;A&nbsp;copy&nbsp;of&nbsp;the&nbsp;QueryPath&nbsp;object&nbsp;that&nbsp;points&nbsp;to&nbsp;the&nbsp;same&nbsp;set&nbsp;of&nbsp;elements&nbsp;that</span></div></li>
<li><div class="src-line"><a name="a1375"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;the&nbsp;original&nbsp;QueryPath&nbsp;was&nbsp;pointing&nbsp;to.</span></div></li>
<li><div class="src-line"><a name="a1376"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@since</span><span class="src-doc">&nbsp;1.1</span></div></li>
<li><div class="src-line"><a name="a1377"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;cloneAll()</span></div></li>
<li><div class="src-line"><a name="a1378"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1379"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/QueryPath.html#methodbranch">branch</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1380"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1381"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1382"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1383"></a><span class="src-doc">&nbsp;*&nbsp;Exception&nbsp;indicating&nbsp;that&nbsp;a&nbsp;problem&nbsp;has&nbsp;occured&nbsp;inside&nbsp;of&nbsp;a&nbsp;QueryPath&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a1384"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1385"></a><span class="src-key">class&nbsp;</span><a href="../QueryPath/QueryPathException.html">QueryPathException</a>&nbsp;<span class="src-key">extends&nbsp;</span><span class="src-id">Exception&nbsp;</span><span class="src-sym">{</span><span class="src-sym">}</span></div></li>
</ol>
</span></div>
        <div class="credit">
		    <hr class="separator" />
		    Documentation generated on Thu, 19 Mar 2009 18:01:16 -0500 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.2</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>